Optionally demote fatal errors to non-fatal errors.
This behavior is enabled when the new CXTranslationUnit_KeepGoing option is passed to clang_parseTranslationUnit{,2}. It is geared towards use by IDEs and similar consumers of the clang-c API where fatal errors may arise when parsing incomplete code mid-edit, or when include paths are not properly configured yet. In such situations one still wants to get as much information as possible about a TU. Previously, the semantic analysis would not instantiate templates or report additional fatal errors after the first fatal error was encountered. Fixes PR24268. Patch by Milian Wolff. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262318 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang-c/Index.h 12 additions, 1 deletioninclude/clang-c/Index.h
- include/clang/Basic/Diagnostic.h 7 additions, 0 deletionsinclude/clang/Basic/Diagnostic.h
- lib/Basic/Diagnostic.cpp 1 addition, 0 deletionslib/Basic/Diagnostic.cpp
- lib/Basic/DiagnosticIDs.cpp 6 additions, 0 deletionslib/Basic/DiagnosticIDs.cpp
- test/Index/keep-going.cpp 29 additions, 0 deletionstest/Index/keep-going.cpp
- tools/c-index-test/c-index-test.c 2 additions, 0 deletionstools/c-index-test/c-index-test.c
- tools/libclang/CIndex.cpp 3 additions, 0 deletionstools/libclang/CIndex.cpp
- unittests/Basic/DiagnosticTest.cpp 23 additions, 0 deletionsunittests/Basic/DiagnosticTest.cpp
Loading
Please register or sign in to comment