aaron.ballman added inline comments.

================
Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:313-317
+  auto& Context = Finder->getASTContext();
+  auto B =
+      internal::getExpansionLocOfMacro(MacroName, Node.getBeginLoc(), Context);
+  if (!B) return false;
+  auto E =
----------------
Please do not use auto when the type is not spelled out in the initialization.


================
Comment at: clang/lib/ASTMatchers/ASTMatchersInternal.cpp:614
+                       const ASTContext &Context) {
+  auto& SM = Context.getSourceManager();
+  const auto& LangOpts = Context.getLangOpts();
----------------
Same comments here about use of `auto`.


================
Comment at: clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp:128
+
+TEST(IsExpandedFromMacro, ShouldNotMatchDifferentInstances) {
+  std::string input = R"cc(
----------------
One test that's missing which is important are macros defined on the command 
line rather than defined in source, as those have expansion locations that are 
in the scratch buffer rather than a source file. Are you able to add such a 
test?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73965



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

Reply via email to