summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaLookup.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2014-06-11 21:24:13 +0000
committerHans Wennborg <hans@hanshq.net>2014-06-11 21:24:13 +0000
commit660101302ec169fdea2113138768fceaf32617a2 (patch)
treec1a4bb22724f2de2b5d8b01b04934281ee8e1e39 /clang/lib/Sema/SemaLookup.cpp
parent9c10032c79ca9c1db134962aa5ee882a5f5c98ca (diff)
downloadbcm5719-llvm-660101302ec169fdea2113138768fceaf32617a2.tar.gz
bcm5719-llvm-660101302ec169fdea2113138768fceaf32617a2.zip
Fix the VS2012 build.
It didn't handle the in-class member initializer and compound literal. llvm-svn: 210707
Diffstat (limited to 'clang/lib/Sema/SemaLookup.cpp')
-rw-r--r--clang/lib/Sema/SemaLookup.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index c86320de420..ac1aeb6b487 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<TypoCorrection, 2> 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<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::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.
OpenPOWER on IntegriCloud