diff options
author | Kaelyn Takata <rikka@google.com> | 2014-10-27 18:07:29 +0000 |
---|---|---|
committer | Kaelyn Takata <rikka@google.com> | 2014-10-27 18:07:29 +0000 |
commit | 07ccb0381ae81807ab0900d090dc7179b7440589 (patch) | |
tree | 4fe8e83efadbe7bcc4fe94317f00f9e46b6503d4 /lib/Sema/SemaCXXScopeSpec.cpp | |
parent | ebbcfcf837f3aadc20f8b0c091fc2d6ca20c6d8f (diff) |
Pass around CorrectionCandidateCallbacks as unique_ptrs so
TypoCorrectionConsumer can keep the callback around as long as needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220693 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCXXScopeSpec.cpp')
-rw-r--r-- | lib/Sema/SemaCXXScopeSpec.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Sema/SemaCXXScopeSpec.cpp b/lib/Sema/SemaCXXScopeSpec.cpp index 739cba7233..0193e80a75 100644 --- a/lib/Sema/SemaCXXScopeSpec.cpp +++ b/lib/Sema/SemaCXXScopeSpec.cpp @@ -575,12 +575,11 @@ bool Sema::BuildCXXNestedNameSpecifier(Scope *S, // We haven't found anything, and we're not recovering from a // different kind of error, so look for typos. DeclarationName Name = Found.getLookupName(); - NestedNameSpecifierValidatorCCC Validator(*this); Found.clear(); - if (TypoCorrection Corrected = - CorrectTypo(Found.getLookupNameInfo(), Found.getLookupKind(), S, - &SS, Validator, CTK_ErrorRecovery, LookupCtx, - EnteringContext)) { + if (TypoCorrection Corrected = CorrectTypo( + Found.getLookupNameInfo(), Found.getLookupKind(), S, &SS, + llvm::make_unique<NestedNameSpecifierValidatorCCC>(*this), + CTK_ErrorRecovery, LookupCtx, EnteringContext)) { if (LookupCtx) { bool DroppedSpecifier = Corrected.WillReplaceSpecifier() && |