diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2013-06-11 22:26:34 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2013-06-11 22:26:34 +0000 |
commit | 6cc05f7f01b22d279ca4c95690dd6fe8df626579 (patch) | |
tree | 8d736e593210458f8914af8c0525b532dca21497 /clang/lib/Sema/SemaInit.cpp | |
parent | 5c50a16ee01911ae23cbc7f1caf6c909b8708ec4 (diff) | |
download | bcm5719-llvm-6cc05f7f01b22d279ca4c95690dd6fe8df626579.tar.gz bcm5719-llvm-6cc05f7f01b22d279ca4c95690dd6fe8df626579.zip |
Tweak r183791 so we don't print a note without a source location.
llvm-svn: 183803
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
-rw-r--r-- | clang/lib/Sema/SemaInit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index 4d6eaa45c41..427f8f41100 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/lib/Sema/SemaInit.cpp @@ -2102,7 +2102,7 @@ InitListChecker::CheckDesignatedInitializer(const InitializedEntity &Entity, for (unsigned i = 0, e = StrLen; i != e; ++i) { llvm::APInt CodeUnit(PromotedCharTyWidth, SL->getCodeUnit(i)); Expr *Init = new (Context) IntegerLiteral( - Context, CodeUnit, PromotedCharTy, SourceLocation()); + Context, CodeUnit, PromotedCharTy, SubExpr->getExprLoc()); if (CharTy != PromotedCharTy) Init = ImplicitCastExpr::Create(Context, CharTy, CK_IntegralCast, Init, 0, VK_RValue); @@ -2124,7 +2124,7 @@ InitListChecker::CheckDesignatedInitializer(const InitializedEntity &Entity, for (unsigned i = 0, e = StrLen; i != e; ++i) { llvm::APInt CodeUnit(PromotedCharTyWidth, Str[i]); Expr *Init = new (Context) IntegerLiteral( - Context, CodeUnit, PromotedCharTy, SourceLocation()); + Context, CodeUnit, PromotedCharTy, SubExpr->getExprLoc()); if (CharTy != PromotedCharTy) Init = ImplicitCastExpr::Create(Context, CharTy, CK_IntegralCast, Init, 0, VK_RValue); |