Skip to content

Regression 8.0.0: Assert/Crash on using structured bindings #40020

@JVApen

Description

@JVApen
Bugzilla Link 40674
Resolution FIXED
Resolved on Aug 26, 2019 09:06
Version 8.0
OS Windows NT
Blocks #41819
Attachments Preprocessed source(s) and associated run script(s)
CC @dwblaikie,@zmodem,@JVApen,@riccibruno,@zygoloid,@rnk,@yuanfang-chen

Extended Description

Compile commands:

C:\LLVM_8_0_0_RC1\bin\clang-cl.exe /nologo /c /EHsc /std:c++17 -fms-compatibility-version=19.11 t.cpp -w -ferror-limit=1
C:\LLVM_7_0_0\bin\clang-cl.exe /nologo /c /EHsc /std:c++17 -fms-compatibility-version=19.11 t.cpp -w -ferror-limit=1

Assert:

Assertion failed: !Init->isValueDependent(), file C:\src\llvm_package_800-rc1\llvm\tools\clang\lib\AST\Decl.cpp, line 2342

t.cpp

#include

constexpr std::pair<int, int> V[] = {{1, 1}};

template <const std::pair<int, int> v[]>
void f() {
const auto &[key, value] = v[0];
}

void g() {
f();
const auto &[key, value] = V[0];
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclangClang issues not falling into any other category

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions