[clang] [Clang] Implement P0963R3 "Structured binding declaration as a condition" (PR #130228)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 10 02:00:17 PDT 2025
================
@@ -5189,6 +5197,12 @@ template <class Emitter> bool Compiler<Emitter>::visitIfStmt(const IfStmt *IS) {
return false;
}
+ if (auto *DD =
+ dyn_cast_if_present<DecompositionDecl>(IS->getConditionVariable());
+ DD && DD->isDecisionVariable())
----------------
cor3ntin wrote:
When is `DD->isDecisionVariable()` false? Should we assert instead?
Ditto elsewhere
https://github.com/llvm/llvm-project/pull/130228
More information about the cfe-commits
mailing list