diff options
author | Kaelyn Uhrain <rikka@google.com> | 2012-01-18 05:58:54 +0000 |
---|---|---|
committer | Kaelyn Uhrain <rikka@google.com> | 2012-01-18 05:58:54 +0000 |
commit | 79d01c17606d3dcb92e1b52391115d3a306a84fc (patch) | |
tree | 4bcd5f630a1acfec287dd238d5339a4959750286 /clang/lib/Sema/SemaExprCXX.cpp | |
parent | 66e05fe63099da5e8ded20cd71ec7a2ea662ca30 (diff) | |
download | bcm5719-llvm-79d01c17606d3dcb92e1b52391115d3a306a84fc.tar.gz bcm5719-llvm-79d01c17606d3dcb92e1b52391115d3a306a84fc.zip |
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.
llvm-svn: 148382
Diffstat (limited to 'clang/lib/Sema/SemaExprCXX.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExprCXX.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index fceb6398077..db41f5a3ca7 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/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) { |