Open llvmbot opened 8 years ago
The codegen support for MSVC-style EH was unstable, so it was off by default. David Majnemer enabled it this February in r261195, which was after the 3.8 branch on Jan 13.
There were other EH fixes between the 3.8 branch and that change, such as r258877. If we want 3.8.1 to enable EH by default, we'll need to merge all of them to the 3.8 branch.
Reid: Do you know more about this one?
Changing component to "Frontend" since this is reproducible with clang.exe, too.
Extended Description
libclang 3.6.2 on Windows can parse code with exceptions just fine, whereas lib clang 3.8.0 produces "error: cannot use 'try' with exceptions disabled".
Providing -### as argument shows that libclang 3.8.0 does not have the corresponding options -fcxx-exceptions and -fexceptions internally (libclang 3.6.2 did).
This forces libclang clients to explicitly pass in those options in order to parse MSVC headers.
Details:
Given the following program making use of libclang:
include <clang-c/Index.h>
include
include
int main(int argc, char *argv[]) { if (argc != 2) { fprintf(stderr, "Usage: $0\n");
return 0;
}
}
and the sample "inputfile.cpp":
int main() { try { } catch (...) {} }
shows that:
libclang 3.8.0:
$ libclangclient.exe intputfile.cpp: inputfile.cpp:3:5: error: cannot use 'try' with exceptions disabled $
libclang 3.6.2:
$ libclangclient.exe intputfile.cpp: $