[clang] [clang][Sema] Fix initialization of GRO when GRO-return type mismatches (CWG2563) (PR #179156)
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 2 22:30:04 PST 2026
================
@@ -1870,7 +1870,8 @@ bool CoroutineStmtBuilder::makeGroDeclAndReturnStmt() {
} else {
GroDecl = VarDecl::Create(
S.Context, &FD, FD.getLocation(), FD.getLocation(),
- &S.PP.getIdentifierTable().get("__coro_gro"), GroType,
+ &S.PP.getIdentifierTable().get("__coro_gro"),
+ S.BuildDecltypeType(ReturnValue).getCanonicalType(),
----------------
ChuanqiXu9 wrote:
Just curious, why `getCanonicalType`?
https://github.com/llvm/llvm-project/pull/179156
More information about the cfe-commits
mailing list