hokein updated this revision to Diff 216777.
hokein marked an inline comment as done.
hokein added a comment.

Add the missing back newline.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66631

Files:
  clang-tools-extra/clang-tidy/google/NonConstReferences.cpp
  clang-tools-extra/test/clang-tidy/google-runtime-references.cpp


Index: clang-tools-extra/test/clang-tidy/google-runtime-references.cpp
===================================================================
--- clang-tools-extra/test/clang-tidy/google-runtime-references.cpp
+++ clang-tools-extra/test/clang-tidy/google-runtime-references.cpp
@@ -149,3 +149,7 @@
 }
 void f9(whitelist::A &);
 void f10(whitelist::B &);
+
+#define DEFINE_F(name) void name(int& a)
+
+DEFINE_F(func) {}
Index: clang-tools-extra/clang-tidy/google/NonConstReferences.cpp
===================================================================
--- clang-tools-extra/clang-tidy/google/NonConstReferences.cpp
+++ clang-tools-extra/clang-tidy/google/NonConstReferences.cpp
@@ -52,6 +52,9 @@
   if (Function == nullptr || Function->isImplicit())
     return;
 
+  if (Function->getLocation().isMacroID())
+    return;
+
   if (!Function->isCanonicalDecl())
     return;
 


Index: clang-tools-extra/test/clang-tidy/google-runtime-references.cpp
===================================================================
--- clang-tools-extra/test/clang-tidy/google-runtime-references.cpp
+++ clang-tools-extra/test/clang-tidy/google-runtime-references.cpp
@@ -149,3 +149,7 @@
 }
 void f9(whitelist::A &);
 void f10(whitelist::B &);
+
+#define DEFINE_F(name) void name(int& a)
+
+DEFINE_F(func) {}
Index: clang-tools-extra/clang-tidy/google/NonConstReferences.cpp
===================================================================
--- clang-tools-extra/clang-tidy/google/NonConstReferences.cpp
+++ clang-tools-extra/clang-tidy/google/NonConstReferences.cpp
@@ -52,6 +52,9 @@
   if (Function == nullptr || Function->isImplicit())
     return;
 
+  if (Function->getLocation().isMacroID())
+    return;
+
   if (!Function->isCanonicalDecl())
     return;
 
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to