diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2013-08-15 22:02:56 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2013-08-15 22:02:56 +0000 |
commit | 89fe0d5842469f231c2a0649ff6d88ade892e6e8 (patch) | |
tree | 2e2d76928ebf201f5011b76e5c2340e4c01a780a /clang/lib/AST/Expr.cpp | |
parent | 35b22f69851dee2fb9e17d94ccf26967b5cf3399 (diff) | |
download | bcm5719-llvm-89fe0d5842469f231c2a0649ff6d88ade892e6e8.tar.gz bcm5719-llvm-89fe0d5842469f231c2a0649ff6d88ade892e6e8.zip |
Properly track l-paren of a CXXFucntionalCastExpr.
In addition to storing more useful information in the AST, this
fixes a semantic check in template instantiation which checks whether
the l-paren location is valid.
Fixes PR16903.
llvm-svn: 188495
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
-rw-r--r-- | clang/lib/AST/Expr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 5c1a27da365..3eeb53e6201 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -2177,7 +2177,7 @@ bool Expr::isUnusedResultAWarning(const Expr *&WarnE, SourceLocation &Loc, WarnE = this; if (const CXXFunctionalCastExpr *CXXCE = dyn_cast<CXXFunctionalCastExpr>(this)) { - Loc = CXXCE->getTypeBeginLoc(); + Loc = CXXCE->getLocStart(); R1 = CXXCE->getSubExpr()->getSourceRange(); } else { const CStyleCastExpr *CStyleCE = cast<CStyleCastExpr>(this); |