forked from OSchip/llvm-project
[clang-tidy] Don't emit google-runtime-references warning for functions defined in macros.
Summary: The macro are usually defined in the common/base headers which are hard for normal users to modify it. Reviewers: gribozavr, alexfh Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66631 llvm-svn: 369739
This commit is contained in:
parent
6ef01c3e2b
commit
c4905a232c
|
@ -52,6 +52,9 @@ void NonConstReferences::check(const MatchFinder::MatchResult &Result) {
|
|||
if (Function == nullptr || Function->isImplicit())
|
||||
return;
|
||||
|
||||
if (Function->getLocation().isMacroID())
|
||||
return;
|
||||
|
||||
if (!Function->isCanonicalDecl())
|
||||
return;
|
||||
|
||||
|
|
|
@ -149,3 +149,7 @@ void f8(B &);
|
|||
}
|
||||
void f9(whitelist::A &);
|
||||
void f10(whitelist::B &);
|
||||
|
||||
#define DEFINE_F(name) void name(int& a)
|
||||
|
||||
DEFINE_F(func) {}
|
||||
|
|
Loading…
Reference in New Issue