caused a crash in <memory> header reparse (msvc kit)
Diff Detail
Event Timeline
Do you mean the testcase that runs only for windows with ms-extensions flag and msvc includes?
I don't know if clang has that kind of tests. Does it?
And if you just meant how to reproduce:
You need to parse and reparse standard <memory> header (my current one is C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\memory). I can provide the options and a command line that I have if you can't reproduce it with default ones...
Changes like this should come with a small, c-index-test based, test case so we don't reintroduce the same bug in the future.
I've also stumbled upon this crash. Here is an even simpler repro that crashes for me (does not involve includes):
#ifndef HEADER_GUARD #define FOO(X) int fhjdfhsdjkfhjkshfjk; FOO(base) struct X { int a; }; int test() { X v; v. } #endif
lib/Parse/Parser.cpp | ||
---|---|---|
519 | This certainly fixes the crash, but aren't we breaking other things if we don't run replayConditionalStack? |
Here's an alternative fix that moves the replay... call into Preprocessor: https://reviews.llvm.org/D36872.
It also fixes the crash and doesn't add invalid compiler errors about non-matching #ifdefs.
This certainly fixes the crash, but aren't we breaking other things if we don't run replayConditionalStack?
I.e. won't we get spurious errors on #endif?