Index: clang-tools-extra/trunk/clang-tidy/google/NonConstReferences.cpp =================================================================== --- clang-tools-extra/trunk/clang-tidy/google/NonConstReferences.cpp +++ clang-tools-extra/trunk/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/trunk/test/clang-tidy/google-runtime-references.cpp =================================================================== --- clang-tools-extra/trunk/test/clang-tidy/google-runtime-references.cpp +++ clang-tools-extra/trunk/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) {}