[clang] [Clang] Fix parsing of reversible type traits in template arguments (PR #95969)

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 20 10:13:00 PDT 2024


================
@@ -141,3 +141,15 @@ namespace r360308_regression {
     return a == b;
   }
 }
+
+namespace GH95598 {
+template<typename _Tp, bool _IsPtr = __is_pointer(_Tp)>
+struct __is_pointer {};
+// expected-warning at -1 {{keyword '__is_pointer' will be made available as an identifier for the remainder of the translation unit}}
----------------
zygoloid wrote:

There are now patches posted for libstdc++ to avoid using our type trait keywords as identifiers.

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


More information about the cfe-commits mailing list