File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
clang/lib/StaticAnalyzer/Core Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -4128,20 +4128,18 @@ void ExprEngine::anchor() { }
41284128void ExprEngine::ConstructInitList (const Expr *E, ArrayRef<Expr *> Args,
41294129 bool IsTransparent, ExplodedNode *Pred,
41304130 ExplodedNodeSet &Dst) {
4131- assert ((isa<InitListExpr>(E) || isa<CXXParenListInitExpr>(E)) &&
4132- " Expected InitListExpr or CXXParenListInitExpr" );
4131+ assert ((isa<InitListExpr, CXXParenListInitExpr>(E)));
41334132
41344133 const LocationContext *LC = Pred->getLocationContext ();
41354134
41364135 StmtNodeBuilder B (Pred, Dst, *currBldrCtx);
41374136 ProgramStateRef S = Pred->getState ();
41384137 QualType T = E->getType ().getCanonicalType ();
41394138
4140- bool IsCompound =
4141- E->isPRValue () && (T->isArrayType () || T->isRecordType () ||
4142- T->isAnyComplexType () || T->isVectorType ());
4139+ bool IsCompound = T->isArrayType () || T->isRecordType () ||
4140+ T->isAnyComplexType () || T->isVectorType ();
41434141
4144- if (Args.size () > 1 || (IsCompound && !IsTransparent)) {
4142+ if (Args.size () > 1 || (E-> isPRValue () && IsCompound && !IsTransparent)) {
41454143 llvm::ImmutableList<SVal> ArgList = getBasicVals ().getEmptySValList ();
41464144 for (Expr *E : llvm::reverse (Args))
41474145 ArgList = getBasicVals ().prependSVal (S->getSVal (E, LC), ArgList);
You can’t perform that action at this time.
0 commit comments