r210707 - Fix the VS2012 build.

Hans Wennborg hans at hanshq.net
Wed Jun 11 14:24:13 PDT 2014


Author: hans
Date: Wed Jun 11 16:24:13 2014
New Revision: 210707

URL: http://llvm.org/viewvc/llvm-project?rev=210707&view=rev
Log:
Fix the VS2012 build.

It didn't handle the in-class member initializer and compound literal.

Modified:
    cfe/trunk/lib/Sema/SemaLookup.cpp

Modified: cfe/trunk/lib/Sema/SemaLookup.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaLookup.cpp?rev=210707&r1=210706&r2=210707&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaLookup.cpp (original)
+++ cfe/trunk/lib/Sema/SemaLookup.cpp Wed Jun 11 16:24:13 2014
@@ -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<TypoCorrection, 2> QualifiedResults;
   bool EnteringContext;
-  bool SearchNamespaces = false;
+  bool SearchNamespaces;
 };
 
 }
@@ -3762,8 +3762,9 @@ TypoCorrectionConsumer::NamespaceSpecifi
 
   // Add the global context as a NestedNameSpecifier
   Distances.insert(1);
-  DistanceMap[1].push_back({cast<DeclContext>(Context.getTranslationUnitDecl()),
-                            NestedNameSpecifier::GlobalSpecifier(Context), 1});
+  SpecifierInfo SI = {cast<DeclContext>(Context.getTranslationUnitDecl()),
+                      NestedNameSpecifier::GlobalSpecifier(Context), 1};
+  DistanceMap[1].push_back(SI);
 }
 
 auto TypoCorrectionConsumer::NamespaceSpecifierSet::buildContextChain(
@@ -3880,7 +3881,8 @@ void TypoCorrectionConsumer::NamespaceSp
 
   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.





More information about the cfe-commits mailing list