[clang] [Clang] Fix parsing of reversible type traits in template arguments (PR #95969)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 19 10:51:32 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}}
----------------
cor3ntin wrote:
@zygoloid I prototyped something https://github.com/llvm/llvm-project/pull/96097
One of the test has a default constructor declaration, ie `is_pod()`, which the lexer approach would struggle to cope with. Let me know what you think
The alternative is to keep status quo or go with the current PR and change the warning to a depreciation warning.
My concern is that until we support older libstdc++ (which will be the case for a long time), we won't be able to rip the hack out
https://github.com/llvm/llvm-project/pull/95969
More information about the cfe-commits
mailing list