diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-01-02 21:46:24 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-01-02 21:46:24 +0000 |
| commit | 266a2ff3acf67e2cea2830b285b5f3253ec06493 (patch) | |
| tree | cf788cb058dbddbfd3c8a9c7d6edb47395a9dc14 /clang/Sema/SemaExpr.cpp | |
| parent | d7c6b0e664fc440bd9e215b8b65889068be295f3 (diff) | |
| download | bcm5719-llvm-266a2ff3acf67e2cea2830b285b5f3253ec06493.tar.gz bcm5719-llvm-266a2ff3acf67e2cea2830b285b5f3253ec06493.zip | |
Compute the proper sourcerange for an CompoundLiteralExpr.
llvm-svn: 45504
Diffstat (limited to 'clang/Sema/SemaExpr.cpp')
| -rw-r--r-- | clang/Sema/SemaExpr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/Sema/SemaExpr.cpp b/clang/Sema/SemaExpr.cpp index 20118c265d1..0778bbd108d 100644 --- a/clang/Sema/SemaExpr.cpp +++ b/clang/Sema/SemaExpr.cpp @@ -704,7 +704,7 @@ ActOnCompoundLiteral(SourceLocation LParenLoc, TypeTy *Ty, if (CheckInitializer(literalExpr, literalType, false)) return 0; - return new CompoundLiteralExpr(literalType, literalExpr); + return new CompoundLiteralExpr(LParenLoc, literalType, literalExpr); } Action::ExprResult Sema:: @@ -1982,7 +1982,7 @@ Sema::ExprResult Sema::ActOnBuiltinOffsetOf(SourceLocation BuiltinLoc, // Otherwise, create a compound literal expression as the base, and // iteratively process the offsetof designators. - Expr *Res = new CompoundLiteralExpr(ArgTy, 0); + Expr *Res = new CompoundLiteralExpr(SourceLocation(), ArgTy, 0); // offsetof with non-identifier designators (e.g. "offsetof(x, a.b[c])") are a // GCC extension, diagnose them. |

