Add another C++ keyword to avoid: enum (#8069)

I've seen at least one failure on a PR because of randomly producing
this as an identifier.
This commit is contained in:
Chandler Carruth authored and GitHub committed 2026-10-31 22:55:52 +00:00
1 parent c0eee3e0bd
commit ff0d3ff107
1 file changed
+4 -4
+4 -4
View File
@@ -2032,10 +2032,10 @@ static auto IdentifierChars() -> llvm::ArrayRef<char> {
}
static constexpr llvm::StringRef NonCarbonCppKeywords[] = {
"asm", "catch", "do", "double", "float", "goto", "int",
"long", "new", "operator", "signed", "std", "this", "throw",
"try", "typename", "unix", "unsigned", "using", "xor", "M_E",
"M_El", "M_PI", "NAN", "NULL",
"asm", "catch", "do", "double", "enum", "float", "goto",
"int", "long", "new", "operator", "signed", "std", "this",
"throw", "try", "typename", "unix", "unsigned", "using", "xor",
"M_E", "M_El", "M_PI", "NAN", "NULL",
};
// Names that generated code declares itself, which random identifiers must