[clang] 425fd3e - [clang][NFC] Rename FirstCoroutineStmtKind enumerators
Vlad Serebrennikov via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 10 13:15:38 PST 2024
Author: Vlad Serebrennikov
Date: 2024-02-11T00:15:25+03:00
New Revision: 425fd3eb10f29e73d722b4c2bc9cb50798de18e8
URL: https://github.com/llvm/llvm-project/commit/425fd3eb10f29e73d722b4c2bc9cb50798de18e8
DIFF: https://github.com/llvm/llvm-project/commit/425fd3eb10f29e73d722b4c2bc9cb50798de18e8.diff
LOG: [clang][NFC] Rename FirstCoroutineStmtKind enumerators
So that they do not use coroutine keywords.
Fixed buildbot failure https://lab.llvm.org/buildbot/#/builders/86/builds/74100
Added:
Modified:
clang/include/clang/Sema/ScopeInfo.h
Removed:
################################################################################
diff --git a/clang/include/clang/Sema/ScopeInfo.h b/clang/include/clang/Sema/ScopeInfo.h
index 076dcaaf223a34..ca3d0a02ddb579 100644
--- a/clang/include/clang/Sema/ScopeInfo.h
+++ b/clang/include/clang/Sema/ScopeInfo.h
@@ -97,7 +97,7 @@ class PossiblyUnreachableDiag {
: PD(PD), Loc(Loc), Stmts(Stmts) {}
};
-enum class FirstCoroutineStmtKind { co_return, co_await, co_yield };
+enum class FirstCoroutineStmtKind { CoReturn, CoAwait, CoYield };
/// Retains information about a function, method, or block that is
/// currently being parsed.
@@ -508,11 +508,11 @@ class FunctionScopeInfo {
FirstCoroutineStmtKind =
llvm::StringSwitch<unsigned char>(Keyword)
.Case("co_return",
- llvm::to_underlying(FirstCoroutineStmtKind::co_return))
+ llvm::to_underlying(FirstCoroutineStmtKind::CoReturn))
.Case("co_await",
- llvm::to_underlying(FirstCoroutineStmtKind::co_await))
+ llvm::to_underlying(FirstCoroutineStmtKind::CoAwait))
.Case("co_yield",
- llvm::to_underlying(FirstCoroutineStmtKind::co_yield));
+ llvm::to_underlying(FirstCoroutineStmtKind::CoYield));
}
StringRef getFirstCoroutineStmtKeyword() const {
@@ -521,11 +521,11 @@ class FunctionScopeInfo {
auto Value =
static_cast<enum FirstCoroutineStmtKind>(FirstCoroutineStmtKind);
switch (Value) {
- case FirstCoroutineStmtKind::co_return:
+ case FirstCoroutineStmtKind::CoReturn:
return "co_return";
- case FirstCoroutineStmtKind::co_await:
+ case FirstCoroutineStmtKind::CoAwait:
return "co_await";
- case FirstCoroutineStmtKind::co_yield:
+ case FirstCoroutineStmtKind::CoYield:
return "co_yield";
};
llvm_unreachable("FirstCoroutineStmtKind has an invalid value");
More information about the cfe-commits
mailing list