We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1301349 commit 727c5e8Copy full SHA for 727c5e8
clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
@@ -370,9 +370,8 @@ std::optional<SVal> SValBuilder::getConstantVal(const Expr *E) {
370
const auto *TE = cast<TypeTraitExpr>(E);
371
if (TE->isStoredAsBoolean())
372
return makeTruthVal(TE->getBoolValue(), TE->getType());
373
- if (TE->getType()->isIntegralOrEnumerationType())
374
- return makeIntVal(TE->getAPValue().getInt());
375
- return std::nullopt;
+ assert(TE->getAPValue().isInt() && "APValue type not supported");
+ return makeIntVal(TE->getAPValue().getInt());
376
}
377
378
case Stmt::IntegerLiteralClass:
0 commit comments