Clang crash when returning C++ lambda with new build system

Originator:ryan.brown
Number:rdar://34114835 Date Originated:2017-08-29
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 9.0 beta 6 (9M214v)
Classification:Serious Reproducible:Always
 
Clang crashes when invoked using `-index-store-path` when compiling a function with an `auto` return type that returns a C++ lambda. Clang is invoked this way when using Xcode's new build system.

Steps to Reproduce:
1- Write the following to test.cpp:
auto f()
{
  return [] { return 42; };
}

2- Compile it with "clang++ -std=c++14 -index-store-path MyIndex -c test.cpp"

Expected Results:
No crash

Observed Results:
Crash

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!