diff options
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/modernize-use-nullptr.cpp')
-rw-r--r-- | clang-tools-extra/test/clang-tidy/modernize-use-nullptr.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/modernize-use-nullptr.cpp b/clang-tools-extra/test/clang-tidy/modernize-use-nullptr.cpp index 8370bfa22e3..f176fca71cb 100644 --- a/clang-tools-extra/test/clang-tidy/modernize-use-nullptr.cpp +++ b/clang-tools-extra/test/clang-tidy/modernize-use-nullptr.cpp @@ -78,6 +78,14 @@ void test_macro_expansion3() { #undef MACRO_EXPANSION_HAS_NULL } +void test_macro_expansion4() { +#define MY_NULL NULL + int *p = MY_NULL; + // CHECK-MESSAGES: :[[@LINE-1]]:12: warning: use nullptr [modernize-use-nullptr] + // CHECK-FIXES: int *p = nullptr; +#undef MY_NULL +} + #define IS_EQ(x, y) if (x != y) return; void test_macro_args() { int i = 0; |