aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM!



================
Comment at: clang/lib/ASTMatchers/ASTMatchersInternal.cpp:518
+    // Linkage Spec can just be ignored
+    // FIXME: Any other DeclContext kinds that can be safely disregarded
+    if (isa<LinkageSpecDecl>(Ctx))
----------------
I would imagine we'd want to skip an `ExternCContextDecl` for similar reasons, 
though I am struggling to find a test case that actually generates that context.


================
Comment at: clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp:1648
+  // https://bugs.llvm.org/show_bug.cgi?id=42193
+  std::string code = R"cpp(namespace foo { extern "C" void test(); })cpp";
+  EXPECT_TRUE(matches(code, functionDecl(hasName("test"))));
----------------
As another test:
```
namespace foo {
extern "C" {
void test();
}
}
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75202/new/

https://reviews.llvm.org/D75202



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to