[PATCH] D33841: [clang-tidy] redundant 'extern' keyword check

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 12 10:07:06 PDT 2019


lebedev.ri added inline comments.


================
Comment at: clang-tidy/readability/RedundantExternCheck.cpp:43-44
+
+  if (FD->getBeginLoc().isMacroID())
+    return;
+
----------------
koldaniel wrote:
> lebedev.ri wrote:
> > Similarly, do this in `registerMatchers()`
> Could you please help me how could I achieve that? I did not find any matchers which match for macros.
You can simply add your own matchers, see e.g. `AST_MATCHER()`'s in  `AvoidCArraysCheck.cpp`.


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

https://reviews.llvm.org/D33841





More information about the cfe-commits mailing list