Skip to content

Commit f7d033b

Browse files
committed
[clang][ssaf][NFC] Add assertion to a test
1 parent df0e696 commit f7d033b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

clang/unittests/Analysis/Scalable/ASTEntityMappingTest.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,11 @@ TEST(ASTEntityMappingTest, BuiltinFunction) {
137137
ASSERT_NE(CE, nullptr);
138138

139139
const auto *Callee = CE->getDirectCallee();
140-
if (Callee && Callee->getBuiltinID()) {
141-
auto EntityName = getLocalEntityNameForDecl(Callee);
142-
EXPECT_FALSE(EntityName.has_value());
143-
}
140+
ASSERT_NE(Callee, nullptr);
141+
ASSERT_NE(Callee->getBuiltinID(), 0u /* not a built-in */);
142+
143+
auto EntityName = getLocalEntityNameForDecl(Callee);
144+
EXPECT_FALSE(EntityName.has_value());
144145
}
145146

146147
TEST(ASTEntityMappingTest, UnsupportedDecl) {

0 commit comments

Comments
 (0)