[clang] [clang][DebugInfo] Don't assume static locals are emitted inside their function (PR #236525)

Paulius Velesko via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 26 22:46:46 PST 2026


pvelesko wrote:

@dzhidzhoev thanks for the constexpr alias example on #243405. It shows the empty stack isn't CUDA-specific, so I generalized this PR: the assert is gone and the declaration context is used whenever no lexical block is open. Your example and the nodebug cases are tested in DebugInfo/CXX/static-local-alias.cpp. This also fixes #243381. Could you take another look? @Michael137 this supersedes my earlier reply: plain C++ aliases reach the same path, so keeping the assert for C++ isn't possible.


https://github.com/llvm/llvm-project/pull/236525


More information about the cfe-commits mailing list