]> granicus.if.org Git - clang/commitdiff
Micro cleanup: use an array of const char, rather than an array of char, as the
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 23 Jan 2013 23:38:20 +0000 (23:38 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 23 Jan 2013 23:38:20 +0000 (23:38 +0000)
type of the string literal implicitly used for a raw user-defined literal call.
No test; this has no semantic impact.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173309 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExpr.cpp

index 2e1188164db85e25061a099df3f404a7d604cb0e..fd165aca89ef048046dda650fe17e1186ab707b7 100644 (file)
@@ -2768,7 +2768,7 @@ ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) {
       SourceLocation TokLoc = Tok.getLocation();
       unsigned Length = Literal.getUDSuffixOffset();
       QualType StrTy = Context.getConstantArrayType(
-          Context.CharTy, llvm::APInt(32, Length + 1),
+          Context.CharTy.withConst(), llvm::APInt(32, Length + 1),
           ArrayType::Normal, 0);
       Expr *Lit = StringLiteral::Create(
           Context, StringRef(TokSpelling.data(), Length), StringLiteral::Ascii,