aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaLookup.cpp
diff options
context:
space:
mode:
authorKaelyn Uhrain <rikka@google.com>2012-11-19 18:49:53 +0000
committerKaelyn Uhrain <rikka@google.com>2012-11-19 18:49:53 +0000
commit728948fba8ce2249db0a6fd228d883f38434289a (patch)
treec87a21d4e2fd6d8f38755e867e90a2dc29fc03bf /lib/Sema/SemaLookup.cpp
parent529a73de04a108fe74503a19d9933dbb2b1a6cf0 (diff)
When adding a NamedDecl to a correction, add the underlying Decl (via
getUnderlyingDecl()) so that derivatives of CorrectionCandidateCallback::ValidateCandidate(...) don't have to worry about being thrown by UsingDecls and such. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168317 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r--lib/Sema/SemaLookup.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp
index f6987e7bfb..f257a499d4 100644
--- a/lib/Sema/SemaLookup.cpp
+++ b/lib/Sema/SemaLookup.cpp
@@ -4094,7 +4094,7 @@ void TypoCorrection::addCorrectionDecl(NamedDecl *CDecl) {
if (isKeyword())
CorrectionDecls.clear();
- CorrectionDecls.push_back(CDecl);
+ CorrectionDecls.push_back(CDecl->getUnderlyingDecl());
if (!CorrectionName)
CorrectionName = CDecl->getDeclName();