[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

Thomas Köppe via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 18 13:24:00 PDT 2024


================
@@ -84,6 +84,14 @@ void test_macro_expansion4() {
 #undef MY_NULL
 }
 
+template <typename T> struct pear {
+  T x;
+};
+void test_templated() {
+  pear<int*> p = { NULL };
----------------
tkoeppe wrote:

It definitely does, but I was hoping that the absence would cause some kind of test failure! I.e. "first make sure you see the test fail"... Let me add a bogus expectation to confirm.

https://github.com/llvm/llvm-project/pull/109169


More information about the cfe-commits mailing list