summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseExpr.cpp
diff options
context:
space:
mode:
authorKaelyn Takata <rikka@google.com>2015-04-10 19:16:46 +0000
committerKaelyn Takata <rikka@google.com>2015-04-10 19:16:46 +0000
commit5cc85355960d8f15ce93076a928a484615e35efc (patch)
tree6e81622af04bc8ca5bd3c0902b9f1d960e2bd2d8 /clang/lib/Parse/ParseExpr.cpp
parent89e28f67cc85da4cbad79ce11a6125460cd09296 (diff)
downloadbcm5719-llvm-5cc85355960d8f15ce93076a928a484615e35efc.tar.gz
bcm5719-llvm-5cc85355960d8f15ce93076a928a484615e35efc.zip
Don't eagerly typo-correct to a keyword if the next token is a right paren.
Take advantage of the delayed typo no longer being eagerly corrected to a keyword to filter out keyword corrections (and other things like unresolved & overloaded expressions, which have placeholder types) when correcting typos inside of a decltype(). llvm-svn: 234623
Diffstat (limited to 'clang/lib/Parse/ParseExpr.cpp')
-rw-r--r--clang/lib/Parse/ParseExpr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp
index 72af14d068f..315c9574e95 100644
--- a/clang/lib/Parse/ParseExpr.cpp
+++ b/clang/lib/Parse/ParseExpr.cpp
@@ -928,7 +928,8 @@ ExprResult Parser::ParseCastExpression(bool isUnaryExpression,
Res = Actions.ActOnIdExpression(
getCurScope(), ScopeSpec, TemplateKWLoc, Name, Tok.is(tok::l_paren),
isAddressOfOperand, std::move(Validator),
- /*IsInlineAsmIdentifier=*/false, &Replacement);
+ /*IsInlineAsmIdentifier=*/false,
+ Tok.is(tok::r_paren) ? nullptr : &Replacement);
if (!Res.isInvalid() && !Res.get()) {
UnconsumeToken(Replacement);
return ParseCastExpression(isUnaryExpression, isAddressOfOperand,
OpenPOWER on IntegriCloud