Skip to content

Commit c112e2e

Browse files
committed
cleanup
1 parent ab541b0 commit c112e2e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

clang/lib/StaticAnalyzer/Core/ExprEngine.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4128,20 +4128,18 @@ void ExprEngine::anchor() { }
41284128
void 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);

0 commit comments

Comments
 (0)