From ff0d3ff10755d20553085af0e6af3aed5122eb1f Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Sat, 31 Oct 2026 22:55:52 +0000 Subject: [PATCH] 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. --- toolchain/benchmarking/source_gen.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/toolchain/benchmarking/source_gen.cpp b/toolchain/benchmarking/source_gen.cpp index 4838e9b860a8..56d7e1dc57f0 100644 --- a/toolchain/benchmarking/source_gen.cpp +++ b/toolchain/benchmarking/source_gen.cpp @@ -2032,10 +2032,10 @@ static auto IdentifierChars() -> llvm::ArrayRef { } 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