diff options
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 2fa7b2515e..1e04ac734e 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -1404,8 +1404,7 @@ bool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, std::string CorrectedQuotedStr(Corrected.getQuoted(getLangOptions())); R.setLookupName(Corrected.getCorrection()); - if (!Corrected.isKeyword()) { - NamedDecl *ND = Corrected.getCorrectionDecl(); + if (NamedDecl *ND = Corrected.getCorrectionDecl()) { R.addDecl(ND); if (isa<ValueDecl>(ND) || isa<FunctionTemplateDecl>(ND)) { if (SS.isEmpty()) |