================
@@ -113,27 +115,37 @@ void
UseInternalLinkageCheck::registerMatchers(MatchFinder *Finder) {
allOf(isFirstDecl(), isAllRedeclsInMainFile(HeaderFileExtensions),
unless(anyOf(
// 1. internal linkage
- isStaticStorageClass(), isInAnonymousNamespace(),
- // 2. explicit external linkage
- isExternStorageClass(), isExternC(),
- // 3. template
- isExplicitTemplateSpecialization(),
- hasAncestor(decl(anyOf(
- // 4. friend
- friendDecl(),
- // 5. module export decl
- exportDecl()))))));
+ isInAnonymousNamespace(), hasAncestor(decl(anyOf(
+ // 2. friend
+ friendDecl(),
+ // 3. module export decl
+ exportDecl()))))));
----------------
localspook wrote:
I had to take some submatchers out of this `Common` matcher and inline them
into the function and variable matchers because those submatcheres were invalid
for classes.
https://github.com/llvm/llvm-project/pull/172797
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits