[all-commits] [llvm/llvm-project] a89f17: [clang] Fix crash on invalid out-of-line enum defi...
Haojian Wu via All-commits
all-commits at lists.llvm.org
Mon Apr 6 23:42:46 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a89f174e502165ac566f922edeaee53329172b22
https://github.com/llvm/llvm-project/commit/a89f174e502165ac566f922edeaee53329172b22
Author: Haojian Wu <hokein.wu at gmail.com>
Date: 2026-04-07 (Tue, 07 Apr 2026)
Changed paths:
M clang/lib/Sema/SemaDecl.cpp
A clang/test/SemaTemplate/GH187909.cpp
Log Message:
-----------
[clang] Fix crash on invalid out-of-line enum definition with template parameters (#188246)
clang crashes when an invalid out-of-line enum definition is provided
with template parameters. In these cases, clang produces a dependent
type within a non-dependent context, violating internal invariants.
The fix is to fallback the underlying type of the enum to `int` during
error recovery in `Sema::ActOnTag` when `Invalid` is true, making it
safe for downstream processing while still preserving the invalid
declaration in the AST.
Fixes #187909
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list