r216479 - Fix an incorrect assert condition added in r216410.
Alexey Samsonov
vonosmas at gmail.com
Tue Aug 26 13:18:26 PDT 2014
Author: samsonov
Date: Tue Aug 26 15:18:26 2014
New Revision: 216479
URL: http://llvm.org/viewvc/llvm-project?rev=216479&view=rev
Log:
Fix an incorrect assert condition added in r216410.
Modified:
cfe/trunk/lib/CodeGen/CGClass.cpp
Modified: cfe/trunk/lib/CodeGen/CGClass.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGClass.cpp?rev=216479&r1=216478&r2=216479&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGClass.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGClass.cpp Tue Aug 26 15:18:26 2014
@@ -1692,7 +1692,7 @@ CodeGenFunction::EmitSynthesizedCXXCopyC
llvm::Value *This, llvm::Value *Src,
const CXXConstructExpr *E) {
if (D->isTrivial()) {
- assert(E->getNumArgs() && "unexpected argcount for trivial ctor");
+ assert(E->getNumArgs() == 1 && "unexpected argcount for trivial ctor");
assert(D->isCopyOrMoveConstructor() &&
"trivial 1-arg ctor not a copy/move ctor");
EmitAggregateCopy(This, Src, E->arg_begin()->getType());
More information about the cfe-commits
mailing list