From 660101302ec169fdea2113138768fceaf32617a2 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Wed, 11 Jun 2014 21:24:13 +0000 Subject: [PATCH] Fix the VS2012 build. It didn't handle the in-class member initializer and compound literal. llvm-svn: 210707 --- clang/lib/Sema/SemaLookup.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp index c86320d..ac1aeb6 100644 --- a/clang/lib/Sema/SemaLookup.cpp +++ b/clang/lib/Sema/SemaLookup.cpp @@ -3342,7 +3342,7 @@ public: SS(SS), CorrectionValidator(CCC), MemberContext(MemberContext), Result(SemaRef, TypoName, LookupKind), Namespaces(SemaRef.Context, SemaRef.CurContext, SS), - EnteringContext(EnteringContext) { + EnteringContext(EnteringContext), SearchNamespaces(false) { Result.suppressDiagnostics(); } @@ -3467,7 +3467,7 @@ private: NamespaceSpecifierSet Namespaces; SmallVector QualifiedResults; bool EnteringContext; - bool SearchNamespaces = false; + bool SearchNamespaces; }; } @@ -3762,8 +3762,9 @@ TypoCorrectionConsumer::NamespaceSpecifierSet::NamespaceSpecifierSet( // Add the global context as a NestedNameSpecifier Distances.insert(1); - DistanceMap[1].push_back({cast(Context.getTranslationUnitDecl()), - NestedNameSpecifier::GlobalSpecifier(Context), 1}); + SpecifierInfo SI = {cast(Context.getTranslationUnitDecl()), + NestedNameSpecifier::GlobalSpecifier(Context), 1}; + DistanceMap[1].push_back(SI); } auto TypoCorrectionConsumer::NamespaceSpecifierSet::buildContextChain( @@ -3880,7 +3881,8 @@ void TypoCorrectionConsumer::NamespaceSpecifierSet::addNameSpecifier( isSorted = false; Distances.insert(NumSpecifiers); - DistanceMap[NumSpecifiers].push_back({Ctx, NNS, NumSpecifiers}); + SpecifierInfo SI = {Ctx, NNS, NumSpecifiers}; + DistanceMap[NumSpecifiers].push_back(SI); } /// \brief Perform name lookup for a possible result for typo correction. -- 2.7.4