diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-09-04 18:29:40 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-09-04 18:29:40 +0000 |
commit | bddb73fa1df420fd9e86d005e1782ed343a3154b (patch) | |
tree | 63e2cb58849c59c9f6e39197dfe25da1af5e323f /clang/lib/Parse/ParseExpr.cpp | |
parent | 5a522353c3bce98d39d91823ac7e1c8950100db7 (diff) | |
download | bcm5719-llvm-bddb73fa1df420fd9e86d005e1782ed343a3154b.tar.gz bcm5719-llvm-bddb73fa1df420fd9e86d005e1782ed343a3154b.zip |
If a destructor is referenced or a pseudo-destructor expression is
formed without a trailing '(', diagnose the error (these expressions
must be immediately called), emit a fix-it hint, and fix the code.
llvm-svn: 81015
Diffstat (limited to 'clang/lib/Parse/ParseExpr.cpp')
-rw-r--r-- | clang/lib/Parse/ParseExpr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index 8fca14ff989..da923c489d4 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/lib/Parse/ParseExpr.cpp @@ -956,7 +956,8 @@ Parser::ParsePostfixExpressionSuffix(OwningExprResult LHS) { OpLoc, OpKind, Tok.getLocation(), Tok.getIdentifierInfo(), - &SS); + SS, + NextToken().is(tok::l_paren)); ConsumeToken(); } else if (getLang().CPlusPlus && Tok.is(tok::kw_operator)) { // We have a reference to a member operator, e.g., t.operator int or |