Skip to content

Commit

Permalink
[clang][NFC] Rename FirstCoroutineStmtKind enumerators
Browse files Browse the repository at this point in the history
So that they do not use coroutine keywords.
Fixed buildbot failure https://lab.llvm.org/buildbot/#/builders/86/builds/74100
  • Loading branch information
Endilll committed Feb 10, 2024
1 parent d2812d2 commit 425fd3e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions clang/include/clang/Sema/ScopeInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 {
Expand All @@ -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");
Expand Down

0 comments on commit 425fd3e

Please sign in to comment.