[clang-tools-extra] [clang-tidy] Allow use of decltype(nullptr) for defining nullptr_t (PR #231637)
Aiden Grossman via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 13 23:10:10 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;
----------------
boomanaiden154 wrote:
Yes. Libc++ also does this in stddef.h.
https://github.com/llvm/llvm-project/pull/231637
More information about the cfe-commits
mailing list