Skip to content

Commit

Permalink
[NFC] remove duplciated unittests for modules
Browse files Browse the repository at this point in the history
There was an overlook to duplicate the unittests for modules. This patch
removes one of this duplication.
  • Loading branch information
ChuanqiXu9 committed Jun 9, 2023
1 parent 4d927fc commit dcbbdbe
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions clang/unittests/AST/DeclTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,23 +240,6 @@ TEST(Decl, ModuleAndInternalLinkage) {

EXPECT_EQ(b->getFormalLinkage(), ModuleLinkage);
EXPECT_EQ(g->getFormalLinkage(), ModuleLinkage);

AST = tooling::buildASTFromCodeWithArgs(
Code.code(), /*Args=*/{"-std=c++20"});
ASTContext &CtxTS = AST->getASTContext();
a = selectFirst<VarDecl>("a", match(varDecl(hasName("a")).bind("a"), CtxTS));
f = selectFirst<FunctionDecl>(
"f", match(functionDecl(hasName("f")).bind("f"), CtxTS));

EXPECT_EQ(a->getFormalLinkage(), InternalLinkage);
EXPECT_EQ(f->getFormalLinkage(), InternalLinkage);

b = selectFirst<VarDecl>("b", match(varDecl(hasName("b")).bind("b"), CtxTS));
g = selectFirst<FunctionDecl>(
"g", match(functionDecl(hasName("g")).bind("g"), CtxTS));

EXPECT_EQ(b->getFormalLinkage(), ModuleLinkage);
EXPECT_EQ(g->getFormalLinkage(), ModuleLinkage);
}

TEST(Decl, GetNonTransparentDeclContext) {
Expand Down

0 comments on commit dcbbdbe

Please sign in to comment.