[PATCH] D20197: [clang-tidy] Ignore using-declarations defined in marcro in misc-unused-using-decls checks.

Daniel Jasper via cfe-commits cfe-commits at lists.llvm.org
Thu May 12 01:52:31 PDT 2016


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

Looks good.


================
Comment at: clang-tidy/misc/UnusedUsingDeclsCheck.cpp:38
@@ -37,1 +37,3 @@
 
+    // Ignores using-declarations defined in macro.
+    if (Result.SourceManager->isMacroBodyExpansion(TargetDecl->getLocStart()),
----------------
nit: "in a macro" or "in macros".

================
Comment at: clang-tidy/misc/UnusedUsingDeclsCheck.cpp:40
@@ +39,3 @@
+    if (Result.SourceManager->isMacroBodyExpansion(TargetDecl->getLocStart()),
+        Result.SourceManager->isMacroBodyExpansion(TargetDecl->getLocEnd())) {
+      return;
----------------
nit: remove braces


Repository:
  rL LLVM

http://reviews.llvm.org/D20197





More information about the cfe-commits mailing list