================
@@ -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@-1 {{keyword '__is_pointer' will be made available as an 
identifier for the remainder of the translation unit}}
----------------
zygoloid wrote:

One thing we could consider doing would be removing the entire "revertible 
keyword" mechanism, and instead, in the lexer, classifying these tokens as 
keywords only if the next pp-token is an `lparen`. That would probably simplify 
the handling of these keywords everywhere, and would happen to give the outcome 
that libstdc++ is expecting in this case too. (It's a breaking change for some 
weird corner cases, such as producing the keyword via macro expansion and 
things like `bool __is_pointer(true);`, but hopefully those things don't happen 
in practice!)

https://github.com/llvm/llvm-project/pull/95969
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to