]> granicus.if.org Git - clang/commitdiff
Fix an incorrect assert condition added in r216410.
authorAlexey Samsonov <vonosmas@gmail.com>
Tue, 26 Aug 2014 20:18:26 +0000 (20:18 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Tue, 26 Aug 2014 20:18:26 +0000 (20:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216479 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGClass.cpp

index 9c1f548c83655a2156ff078fc44909197ea71953..6f7dfefa951d795f5927b5c84b9f429ab98d4d2c 100644 (file)
@@ -1692,7 +1692,7 @@ CodeGenFunction::EmitSynthesizedCXXCopyCtorCall(const CXXConstructorDecl *D,
                                         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());