Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline

[SemaExprCXX] Avoid calling isInSystemHeader for invalid source locations

Authored by labath on Mar 3 2016, 3:30 AM.



While diagnosing a CXXNewExpr warning, we were calling isInSystemHeader(), which expect to be
called with a valid source location. This causes an assertion failure if the location is unknown.
A quick grep shows it's not without precedent to guard calls to the function with a

This fixes a test failure in LLDB, which always creates object with invalid source locations as it
does not (always) have access to the source.

Diff Detail


Event Timeline

labath updated this revision to Diff 49725.Mar 3 2016, 3:30 AM
labath retitled this revision from to [SemaExprCXX] Avoid calling isInSystemHeader for invalid source locations.
labath updated this object.
labath added a reviewer: nlewycky.
labath added subscribers: cfe-commits, lldb-commits.
nlewycky accepted this revision.Mar 3 2016, 9:59 AM
nlewycky edited edge metadata.
This revision is now accepted and ready to land.Mar 3 2016, 9:59 AM
This revision was automatically updated to reflect the committed changes.