[clang-tools-extra] [clang-tidy] Allow use of decltype(nullptr) for defining nullptr_t (PR #231637)

via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 13 23:08:42 PDT 2026


================
@@ -18,3 +18,15 @@ template<class T=decltype(nullptr)>
 struct bar {};
 // CHECK-MESSAGES: :[[@LINE-2]]:18: warning: use std::nullptr_t instead
 // CHECK-FIXES: template<class T=std::nullptr_t>
+
+typedef decltype(nullptr) nullptr_t;
----------------
serge-sans-paille wrote:

Question: that's to support C23's `nullptr_t`, right?

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


More information about the cfe-commits mailing list