summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseStmt.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-10-14 21:53:03 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2019-10-14 21:53:03 +0000
commit7e8fe67f0e2625a538a17958614dddb65453a210 (patch)
treecea5cab82bdd9c89016962b0c98142abbbaf077c /clang/lib/Parse/ParseStmt.cpp
parent9efbc564baab71e3260d211041a9df8acf8a8764 (diff)
downloadbcm5719-llvm-7e8fe67f0e2625a538a17958614dddb65453a210.tar.gz
bcm5719-llvm-7e8fe67f0e2625a538a17958614dddb65453a210.zip
PR43080: Do not build context-sensitive expressions during name classification.
Summary: We don't know what context to use until the classification result is consumed by the parser, which could happen in a different semantic context. So don't build the expression that results from name classification until we get to that point and can handle it properly. This covers everything except C++ implicit class member access, which is a little awkward to handle properly in the face of the protected member access check. But it at least fixes all the currently-filed instances of PR43080. Reviewers: efriedma Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68896 llvm-svn: 374826
Diffstat (limited to 'clang/lib/Parse/ParseStmt.cpp')
-rw-r--r--clang/lib/Parse/ParseStmt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp
index 0532f94cfbc..3bfe4a70bac 100644
--- a/clang/lib/Parse/ParseStmt.cpp
+++ b/clang/lib/Parse/ParseStmt.cpp
@@ -187,7 +187,7 @@ Retry:
// Try to limit which sets of keywords should be included in typo
// correction based on what the next token is.
StatementFilterCCC CCC(Next);
- if (TryAnnotateName(/*IsAddressOfOperand*/ false, &CCC) == ANK_Error) {
+ if (TryAnnotateName(&CCC) == ANK_Error) {
// Handle errors here by skipping up to the next semicolon or '}', and
// eat the semicolon if that's what stopped us.
SkipUntil(tok::r_brace, StopAtSemi | StopBeforeMatch);
OpenPOWER on IntegriCloud