diff options
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/google-runtime-references.cpp')
-rw-r--r-- | clang-tools-extra/test/clang-tidy/google-runtime-references.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/clang-tools-extra/test/clang-tidy/google-runtime-references.cpp b/clang-tools-extra/test/clang-tidy/google-runtime-references.cpp index c96f28f3009..b9f84b62955 100644 --- a/clang-tools-extra/test/clang-tidy/google-runtime-references.cpp +++ b/clang-tools-extra/test/clang-tidy/google-runtime-references.cpp @@ -1,4 +1,8 @@ -// RUN: %check_clang_tidy %s google-runtime-references %t +// RUN: %check_clang_tidy %s google-runtime-references %t -- \ +// RUN: -extra-arg="-std=c++11" \ +// RUN: -config="{CheckOptions: \ +// RUN: [{key: google-runtime-references.WhiteListTypes, \ +// RUN: value: 'whitelist::A; whitelist::B'}]}" -- int a; int &b = a; @@ -137,3 +141,12 @@ A& operator>>=(A& a, const A& b) { return a; } A& operator|=(A& a, const A& b) { return a; } A& operator^=(A& a, const A& b) { return a; } A& operator&=(A& a, const A& b) { return a; } + +namespace whitelist { +class A {}; +class B {}; +void f7(A &); +void f8(B &); +} +void f9(whitelist::A &); +void f10(whitelist::B &); |