diff --git a/lib/AST/StmtPrinter.cpp b/lib/AST/StmtPrinter.cpp index af8e5c792a..7309e7c889 100644 --- a/lib/AST/StmtPrinter.cpp +++ b/lib/AST/StmtPrinter.cpp @@ -742,7 +742,7 @@ void StmtPrinter::VisitStringLiteral(StringLiteral *Str) { case StringLiteral::UTF32: OS << 'U'; break; } OS << '"'; - static char Hex[] = "0123456789ABCDEF"; + static const char Hex[] = "0123456789ABCDEF"; unsigned LastSlashX = Str->getLength(); for (unsigned I = 0, N = Str->getLength(); I != N; ++I) { diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index 50230f068d..ea7e0e8a80 100644 --- a/lib/Sema/SemaOverload.cpp +++ b/lib/Sema/SemaOverload.cpp @@ -6426,7 +6426,7 @@ class BuiltinOperatorOverloadBuilder { enum PromotedType { Flt, Dbl, LDbl, SI, SL, SLL, UI, UL, ULL, Dep=-1 }; - static PromotedType ConversionsTable[LastPromotedArithmeticType] + static const PromotedType ConversionsTable[LastPromotedArithmeticType] [LastPromotedArithmeticType] = { /* Flt*/ { Flt, Dbl, LDbl, Flt, Flt, Flt, Flt, Flt, Flt }, /* Dbl*/ { Dbl, Dbl, LDbl, Dbl, Dbl, Dbl, Dbl, Dbl, Dbl },