Index: lib/StaticAnalyzer/Core/ExprEngine.cpp =================================================================== --- lib/StaticAnalyzer/Core/ExprEngine.cpp +++ lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -2466,6 +2466,11 @@ ProgramPoint::PostLValueKind); return; } + if (const auto* BD = dyn_cast(D)) { + // FIXME: proper support for bound declarations. + // For now, let's just prevent crashing. + return; + } llvm_unreachable("Support for this Decl not implemented."); } Index: test/Analysis/structured_bindings.cc =================================================================== --- /dev/null +++ test/Analysis/structured_bindings.cc @@ -0,0 +1,10 @@ +// RUN: %clang_analyze_cc1 -std=c++17 -analyzer-checker=core -verify %s + +// expected-no-diagnostics +struct s { int a; }; +int foo() { + auto[a] = s{1}; // FIXME: proper modelling + if (a) { + } +} +