This is an archive of the discontinued LLVM Phabricator instance.

Make sure SLocEntry is an expansion before using getExpansion() method in SourceManager.
AbandonedPublic

Authored by hokein on Feb 29 2016, 8:32 AM.

Details

Reviewers
rtrieu
bkramer
Summary

Make it not trigger the assertion in getExpansion().

Fixes PR24749.

Diff Detail

Event Timeline

hokein updated this revision to Diff 49382.Feb 29 2016, 8:32 AM
hokein retitled this revision from to Make sure SLocEntry is an expansion before using getExpansion() method in SourceManager..
hokein updated this object.
hokein set the repository for this revision to rL LLVM.
hokein added a subscriber: cfe-commits.
hokein updated this object.Mar 1 2016, 6:17 AM
hokein edited reviewers, added: rtrieu, bkramer; removed: alexfh.
bkramer edited edge metadata.Mar 1 2016, 6:41 AM

This doesn't have a test case. Also I don't understand why this is the correct fix. If someone is calling one of those method with a file SourceLocation (as opposed to a macro SourceLocation) they should stop doing that.

hokein abandoned this revision.Mar 2 2016, 5:58 AM

This doesn't have a test case. Also I don't understand why this is the correct fix. If someone is calling one of those method with a file SourceLocation (as opposed to a macro SourceLocation) they should stop doing that.

After a more deep investigation, I think the bug isn't related to SourceManger now. I'm closing this as in favor of D17805 .