[clang] [clang] Warn when builtin names are used outside of invocations (PR #96097)
Mital Ashok via cfe-commits
cfe-commits at lists.llvm.org
Sat Jun 29 12:59:15 PDT 2024
MitalAshok wrote:
What if we went in the other direction? We want to deprecate `__is_pointer` as an identifier, so only make it an identifier when it is being used by libstdc++ as an identifier. libstdc++ usage looks something like:
```c++
// type template
template<typename T>
struct __is_pointer;
template<typename T>
struct __is_pointer<T*> : true_type {};
__is_pointer<T>::value
// variable template
template<typename T>
inline constexpr bool __is_pointer = ...
__is_pointer<T>
```
So only make it an identifier if it is preceded by `struct`/`class` or if it is succeeded by `<`/`=`?
https://github.com/llvm/llvm-project/pull/96097
More information about the cfe-commits
mailing list