This is an archive of the discontinued LLVM Phabricator instance.

Optionally demote fatal errors to non-fatal errors.
ClosedPublic

Authored by milianw on Feb 20 2016, 5:29 PM.

Details

Summary

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 bug https://llvm.org/bugs/show_bug.cgi?id=24268.

Diff Detail

Event Timeline

milianw updated this revision to Diff 48603.Feb 20 2016, 5:29 PM
milianw retitled this revision from to Optionally demote fatal errors to non-fatal errors..
milianw updated this object.
milianw added a subscriber: llvm-commits.
milianw added a project: Restricted Project.Feb 20 2016, 5:30 PM
ehsan resigned from this revision.Feb 22 2016, 12:26 PM
ehsan removed a reviewer: ehsan.

I don't feel confident in reviewing this, but based on a cursory look the patch looks fine. :-)

Ping? This patch would be very helpful for us to have in KDevelop. Can anyone give us a review please? I'm willing to amend it as needed to get this issue resolved.

Thanks

klimek added inline comments.Feb 29 2016, 1:51 AM
lib/Basic/DiagnosticIDs.cpp
465

Add '.'.

unittests/Basic/DiagnosticTest.cpp
56

That block seems superfluous?

milianw updated this revision to Diff 49352.Feb 29 2016, 3:05 AM

attended klimek's review comments

klimek accepted this revision.Feb 29 2016, 3:08 AM
klimek edited edge metadata.

LG

This revision is now accepted and ready to land.Feb 29 2016, 3:08 AM

Thanks Manuel!

Can someone please commit the change for me? I don't have the required permissions yet to do so.

klimek closed this revision.Mar 1 2016, 3:01 AM

Submitted as r262318. Now go get submit access ;)