aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorKaelyn Uhrain <rikka@google.com>2012-01-18 05:58:54 +0000
committerKaelyn Uhrain <rikka@google.com>2012-01-18 05:58:54 +0000
commit4798f8dfdb15fc03fa6b4104efed8762d52ebb18 (patch)
tree9d2df7fbbe37f8a2565e2dc49f30b142382f720e /lib/Sema/SemaExprCXX.cpp
parent4c3fc9b38d3723f73e4ded594cebf38c76f91d93 (diff)
Convert DiagnoseEmptyLookup to use correction callbacks.
No new unit tests yet as there is no behavioral change (except for slightly more specific filtering in Sema::ActOnStartOfLambdaDefinition). Tests will be added as the code paths are traced in greater depth to determine how to improve the results--there are at least one or two known bugs that require those improvements. This commit lays the groundwork for those changes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148382 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r--lib/Sema/SemaExprCXX.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index fceb639807..db41f5a3ca 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -4880,9 +4880,11 @@ void Sema::ActOnStartOfLambdaDefinition(LambdaIntroducer &Intro,
LookupParsedName(R, CurScope, &ScopeSpec);
if (R.isAmbiguous())
continue;
- if (R.empty())
- if (DiagnoseEmptyLookup(CurScope, ScopeSpec, R, CTC_Unknown))
+ if (R.empty()) {
+ DeclFilterCCC<VarDecl> Validator;
+ if (DiagnoseEmptyLookup(CurScope, ScopeSpec, R, Validator))
continue;
+ }
VarDecl *Var = R.getAsSingle<VarDecl>();
if (!Var) {