[cfe-commits] r151356 - /cfe/trunk/lib/Sema/SemaInit.cpp
Matt Beaumont-Gay
matthewbg at google.com
Fri Feb 24 00:38:01 PST 2012
Author: matthewbg
Date: Fri Feb 24 02:37:56 2012
New Revision: 151356
URL: http://llvm.org/viewvc/llvm-project?rev=151356&view=rev
Log:
Sink variable into assert
Modified:
cfe/trunk/lib/Sema/SemaInit.cpp
Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=151356&r1=151355&r2=151356&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Fri Feb 24 02:37:56 2012
@@ -4628,8 +4628,7 @@
// Force even a trivial, implicit default constructor to be
// semantically checked. We do this explicitly because we don't build
// the definition for completely trivial constructors.
- CXXRecordDecl *ClassDecl = Constructor->getParent();
- assert(ClassDecl && "No parent class for constructor.");
+ assert(Constructor->getParent() && "No parent class for constructor.");
if (Constructor->isDefaulted() && Constructor->isDefaultConstructor() &&
Constructor->isTrivial() && !Constructor->isUsed(false))
S.DefineImplicitDefaultConstructor(Loc, Constructor);
More information about the cfe-commits
mailing list