https://llvm.org/bugs/show_bug.cgi?id=27324
Bug ID: 27324 Summary: libclang/Windows: exceptions are not supported by default [regression from 3.6.2] Product: clang Version: 3.8 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: libclang Assignee: unassignedclangb...@nondot.org Reporter: nikolai.kos...@theqtcompany.com CC: kli...@google.com, llvm-bugs@lists.llvm.org Classification: Unclassified 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 <cstdlib> #include <cstdio> int main(int argc, char *argv[]) { if (argc != 2) { fprintf(stderr, "Usage: $0 <file>\n"); return 0; } CXIndex index = clang_createIndex(0, /*displayDiagnostics*/ 1); clang_parseTranslationUnit(index, argv[1], 0, 0, NULL, 0, 0); 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: $ -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs