diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-09-09 16:33:13 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-09-09 16:33:13 +0000 |
commit | a1a04786cea2445759026edacd096abd1fbf4a05 (patch) | |
tree | 947186f59f5612280a44351e6025d664540facb1 /lib/Sema/SemaDeclCXX.cpp | |
parent | b2ebdf9ced01a9d691b64952a747289d28fc089e (diff) |
Eliminate the comma locations from all of the Sema routines that deal
with comma-separated lists. We never actually used the comma
locations, nor did we store them in the AST, but we did manage to
waste time during template instantiation to produce fake locations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113495 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 7205abdbc2..e8aa1e6d5f 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -1063,7 +1063,6 @@ Sema::ActOnMemInitializer(Decl *ConstructorD, SourceLocation IdLoc, SourceLocation LParenLoc, ExprTy **Args, unsigned NumArgs, - SourceLocation *CommaLocs, SourceLocation RParenLoc) { if (!ConstructorD) return true; @@ -4644,8 +4643,8 @@ BuildSingleCopyAssign(Sema &S, SourceLocation Loc, QualType T, // Build the call to the assignment operator. ExprResult Call = S.BuildCallToMemberFunction(/*Scope=*/0, - OpEqualRef.takeAs<Expr>(), - Loc, &From, 1, 0, Loc); + OpEqualRef.takeAs<Expr>(), + Loc, &From, 1, Loc); if (Call.isInvalid()) return StmtError(); @@ -5156,20 +5155,17 @@ void Sema::DefineImplicitCopyAssignment(SourceLocation CurrentLocation, CallArgs.push_back(To.takeAs<Expr>()); CallArgs.push_back(From.takeAs<Expr>()); CallArgs.push_back(IntegerLiteral::Create(Context, Size, SizeType, Loc)); - llvm::SmallVector<SourceLocation, 4> Commas; // FIXME: Silly - Commas.push_back(Loc); - Commas.push_back(Loc); ExprResult Call = ExprError(); if (NeedsCollectableMemCpy) Call = ActOnCallExpr(/*Scope=*/0, CollectableMemCpyRef, Loc, move_arg(CallArgs), - Commas.data(), Loc); + Loc); else Call = ActOnCallExpr(/*Scope=*/0, BuiltinMemCpyRef, Loc, move_arg(CallArgs), - Commas.data(), Loc); + Loc); assert(!Call.isInvalid() && "Call to __builtin_memcpy cannot fail!"); Statements.push_back(Call.takeAs<Expr>()); @@ -5511,7 +5507,6 @@ void Sema::FinalizeVarWithDestructor(VarDecl *VD, const RecordType *Record) { void Sema::AddCXXDirectInitializerToDecl(Decl *RealDecl, SourceLocation LParenLoc, MultiExprArg Exprs, - SourceLocation *CommaLocs, SourceLocation RParenLoc) { assert(Exprs.size() != 0 && Exprs.get() && "missing expressions"); |