Skip to content

Commit 5b514e9

Browse files
committed
[clang][ssaf][NFC] Add new testcases for function parameter entity name
1 parent 2c8c699 commit 5b514e9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clang/unittests/Analysis/Scalable/ASTEntityMappingTest.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,14 +299,16 @@ TEST(ASTEntityMappingTest, RecordRedeclaration) {
299299

300300
TEST(ASTEntityMappingTest, ParmVarDeclRedeclaration) {
301301
auto AST = tooling::buildASTFromCode(R"(
302+
void foo(int);
302303
void foo(int x);
304+
void foo(int y);
303305
void foo(int x) {}
304306
)");
305307
auto &Ctx = AST->getASTContext();
306308

307309
auto Matcher = functionDecl(hasName("foo")).bind("decl");
308310
auto Matches = match(Matcher, Ctx);
309-
ASSERT_EQ(Matches.size(), 2u);
311+
ASSERT_GE(Matches.size(), 2u);
310312

311313
const auto *FirstFuncDecl = Matches[0].getNodeAs<FunctionDecl>("decl");
312314
ASSERT_NE(FirstFuncDecl, nullptr);

0 commit comments

Comments
 (0)