Don't stash types that aren't copyable or moveable into a SmallVector
This seems to be working by accident.
This commit is contained in:
parent
cc1c516558
commit
c0f210d636
|
@ -5121,20 +5121,19 @@ static bool evaluateTypeTrait(Sema &S, TypeTrait Kind, SourceLocation KWLoc,
|
|||
if (RD && RD->isAbstract())
|
||||
return false;
|
||||
|
||||
SmallVector<OpaqueValueExpr, 2> OpaqueArgExprs;
|
||||
llvm::BumpPtrAllocator OpaqueExprAllocator;
|
||||
SmallVector<Expr *, 2> ArgExprs;
|
||||
ArgExprs.reserve(Args.size() - 1);
|
||||
for (unsigned I = 1, N = Args.size(); I != N; ++I) {
|
||||
QualType ArgTy = Args[I]->getType();
|
||||
if (ArgTy->isObjectType() || ArgTy->isFunctionType())
|
||||
ArgTy = S.Context.getRValueReferenceType(ArgTy);
|
||||
OpaqueArgExprs.push_back(
|
||||
ArgExprs.push_back(
|
||||
new (OpaqueExprAllocator.Allocate<OpaqueValueExpr>())
|
||||
OpaqueValueExpr(Args[I]->getTypeLoc().getBeginLoc(),
|
||||
ArgTy.getNonLValueExprType(S.Context),
|
||||
Expr::getValueKindForType(ArgTy)));
|
||||
}
|
||||
for (Expr &E : OpaqueArgExprs)
|
||||
ArgExprs.push_back(&E);
|
||||
|
||||
// Perform the initialization in an unevaluated context within a SFINAE
|
||||
// trap at translation unit scope.
|
||||
|
|
|
@ -145,13 +145,6 @@ class CombinationGenerator {
|
|||
assert(!Range.empty() && "The range must not be empty.");
|
||||
rewind();
|
||||
}
|
||||
|
||||
// Only allow using our custom constructor.
|
||||
WrappingIterator() = delete;
|
||||
WrappingIterator(const WrappingIterator &) = delete;
|
||||
WrappingIterator(WrappingIterator &&) = delete;
|
||||
WrappingIterator &operator=(const WrappingIterator &) = delete;
|
||||
WrappingIterator &operator=(WrappingIterator &&) = delete;
|
||||
};
|
||||
|
||||
const ArrayRef<choices_storage_type> VariablesChoices;
|
||||
|
|
Loading…
Reference in New Issue