Skip to content

Commit 2f9f4cc

Browse files
committed
Address PR comments. Remove redudant setConstexprUnknown and excess braces.
1 parent 61521db commit 2f9f4cc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

clang/lib/AST/ExprConstant.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1961,7 +1961,6 @@ CallStackFrame::createConstexprUnknownAPValues(const VarDecl *Key,
19611961
APValue::LValueBase Base) {
19621962
APValue &Result = ConstexprUnknownAPValues[MapKeyTy(Key, Base.getVersion())];
19631963
Result = APValue(Base, CharUnits::One(), APValue::ConstexprUnknown{});
1964-
Result.setConstexprUnknown();
19651964

19661965
return Result;
19671966
}
@@ -3622,11 +3621,10 @@ static bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E,
36223621
// all subobjects includes the entire constant evaluation and whose dynamic
36233622
// type is constexpr-unknown.
36243623
if (AllowConstexprUnknown) {
3625-
if (!Result) {
3624+
if (!Result)
36263625
Result = &Info.CurrentCall->createConstexprUnknownAPValues(VD, Base);
3627-
} else {
3626+
else
36283627
Result->setConstexprUnknown();
3629-
}
36303628
}
36313629
return true;
36323630
}

0 commit comments

Comments
 (0)