[clang] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)
Oleksandr T. via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 25 22:54:34 PDT 2024
================
@@ -177,6 +177,26 @@ static bool isLanguageDefinedBuiltin(const SourceManager &SourceMgr,
return false;
}
+static bool isReservedAttrName(Preprocessor &PP, IdentifierInfo *II) {
----------------
a-tarasyuk wrote:
>From my, attribute names aren't typical language keywords, and only a specific set defined by the standard should be disallowed. For example, `likely` and `unlikely` should be permitted. Reusing attribute parsing doesn't seem appropriate here. I haven't found a predefined list of standard attributes; if there is one, I would appreciate it if you could direct me to it. Thanks
https://github.com/llvm/llvm-project/pull/106036
More information about the cfe-commits
mailing list