Assertion failed: Shift >= 0, file C:\src\llvm_package_303050\llvm\tools\clang\lib\Format\WhitespaceManager.cpp, line 245 #32854
Closed
Description
| Bugzilla Link | 33507 |
| Resolution | FIXED |
| Resolved on | Aug 25, 2017 13:31 |
| Version | trunk |
| OS | Windows NT |
| Blocks | #33196 |
| Reporter | LLVM Bugzilla Contributor |
| CC | @zmodem,@donhinton,@krasimir-google |
Extended Description
We have a dozen of C++ files with some lambdas that make clang-format crash.
One example is this code:
auto found = range::find_if(vsProducts, [&](auto * aProduct) {
static const Version verVs2017;
return true;
});
If I add this code to another C++ file and try to format (on save), it will crash and create a dump file. (the example code was reduced, but still two lines)
I've trimmed the config file to just these two lines to reproduce the problem:
BasedOnStyle: Mozilla
AlignConsecutiveDeclarations: 'true'
Thanks
Activity