summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-03-25 00:08:53 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-03-25 00:08:53 +0000
commit95853077c3f3f959af93a6b50d751834aea1f8d6 (patch)
tree50f618d38ddadfe341b39fd692db62fa3c2e63d3 /clang/lib
parente0451c9378337a7387dc08d549a0a4e33a470c58 (diff)
downloadbcm5719-llvm-95853077c3f3f959af93a6b50d751834aea1f8d6.tar.gz
bcm5719-llvm-95853077c3f3f959af93a6b50d751834aea1f8d6.zip
Fix nondeterminism in computation of builtin operator overload sets.
llvm-svn: 264363
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaOverload.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index cf7fb557a75..e9154bc12a5 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -6818,7 +6818,8 @@ namespace {
/// enumeration types.
class BuiltinCandidateTypeSet {
/// TypeSet - A set of types.
- typedef llvm::SmallPtrSet<QualType, 8> TypeSet;
+ typedef llvm::SetVector<QualType, SmallVector<QualType, 8>,
+ llvm::SmallPtrSet<QualType, 8>> TypeSet;
/// PointerTypes - The set of pointer types that will be used in the
/// built-in candidates.
@@ -6917,7 +6918,7 @@ BuiltinCandidateTypeSet::AddPointerWithMoreQualifiedTypeVariants(QualType Ty,
const Qualifiers &VisibleQuals) {
// Insert this type.
- if (!PointerTypes.insert(Ty).second)
+ if (!PointerTypes.insert(Ty))
return false;
QualType PointeeTy;
@@ -6985,7 +6986,7 @@ bool
BuiltinCandidateTypeSet::AddMemberPointerWithMoreQualifiedTypeVariants(
QualType Ty) {
// Insert this type.
- if (!MemberPointerTypes.insert(Ty).second)
+ if (!MemberPointerTypes.insert(Ty))
return false;
const MemberPointerType *PointerTy = Ty->getAs<MemberPointerType>();
OpenPOWER on IntegriCloud