[clang] [Clang] Consider reachability for file-scope warnings on initializers (PR #163885)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 19 00:26:11 PDT 2025
================
@@ -6750,6 +6750,11 @@ class Sema final : public SemaBase {
/// suffice, e.g., in a default function argument.
Decl *ManglingContextDecl;
+ /// Declaration for initializer if one is currently being
+ /// parsed. Used when an expression has a possibly unreachable
+ /// diagnostic to reference the declaration as a whole.
+ VarDecl *DeclForInitializer = nullptr;
----------------
cor3ntin wrote:
Would that be ever different from ManglingContextDecl? Can we reuse that?
https://github.com/llvm/llvm-project/pull/163885
More information about the cfe-commits
mailing list