https://bugs.llvm.org/show_bug.cgi?id=43215

            Bug ID: 43215
           Summary: Assertion failed: Current->LocalDecls.find(D) ==
                    Current->LocalDecls.end() && "Instantiated local in
                    inner and outer scopes", file
                    C:\src\llvm_package_900-rc3\llvm\tools\clang\lib\Sema\
                    SemaTemplateInstantiate.cpp, line 2994
           Product: clang
           Version: 9.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: jva...@gmail.com
                CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
                    neeil...@live.com, richard-l...@metafoo.co.uk

// F:\Other\Software\LLVM_9_0_0-RC3\bin\clang-cl.exe /nologo /c -w /GR /EHsc 
/std:c++17  t.cpp
template <typename T> auto f(T &&) {
  []() {
    struct G {
      G(int i) : i{i} {}
      ~G() {
        if (i)
          ++i;
      }
      int i{0};
    };
    G{0};
  };
}

auto g() { return f(0); }


>> Assertion failed: Current->LocalDecls.find(D) == Current->LocalDecls.end() 
>> && "Instantiated local in inner and outer scopes", file 
>> C:\src\llvm_package_900-rc3\llvm\tools\clang\lib\Sema\SemaTemplateInstantiate.cpp,
>>  line 2994

1.      <eof> parser at end of file
2.      t.cpp:4:7: instantiating function definition 'f(int &&)::(anonymous
class)::operator()()::G::G'
3.      t.cpp:3:12: instantiating class definition 'G'

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to