summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaInit.cpp
diff options
context:
space:
mode:
authorKaelyn Takata <rikka@google.com>2014-10-27 18:07:29 +0000
committerKaelyn Takata <rikka@google.com>2014-10-27 18:07:29 +0000
commit89c881b548753639e4abf8a6edf30edf22190275 (patch)
tree278309f84e85ce671e0f18e9901c67b3cb79fb0c /clang/lib/Sema/SemaInit.cpp
parente1f49d545dbbf02c77dc297551101eab58cb2485 (diff)
downloadbcm5719-llvm-89c881b548753639e4abf8a6edf30edf22190275.tar.gz
bcm5719-llvm-89c881b548753639e4abf8a6edf30edf22190275.zip
Pass around CorrectionCandidateCallbacks as unique_ptrs so
TypoCorrectionConsumer can keep the callback around as long as needed. llvm-svn: 220693
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
-rw-r--r--clang/lib/Sema/SemaInit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp
index 7a2fa08e28d..d1e51de6210 100644
--- a/clang/lib/Sema/SemaInit.cpp
+++ b/clang/lib/Sema/SemaInit.cpp
@@ -1911,11 +1911,11 @@ InitListChecker::CheckDesignatedInitializer(const InitializedEntity &Entity,
// Name lookup didn't find anything.
// Determine whether this was a typo for another field name.
- FieldInitializerValidatorCCC Validator(RT->getDecl());
if (TypoCorrection Corrected = SemaRef.CorrectTypo(
DeclarationNameInfo(FieldName, D->getFieldLoc()),
Sema::LookupMemberName, /*Scope=*/nullptr, /*SS=*/nullptr,
- Validator, Sema::CTK_ErrorRecovery, RT->getDecl())) {
+ llvm::make_unique<FieldInitializerValidatorCCC>(RT->getDecl()),
+ Sema::CTK_ErrorRecovery, RT->getDecl())) {
SemaRef.diagnoseTypo(
Corrected,
SemaRef.PDiag(diag::err_field_designator_unknown_suggest)
OpenPOWER on IntegriCloud