xazax.hun added a comment.

In https://reviews.llvm.org/D30691#878711, @r.stahl wrote:

> If either of the FullSourceLocs is a MacroID, the call 
> SM.getFileEntryForID(XL.getFileID()) will return a null pointer. The null 
> pointer will crash the program when attempting to call ->getName() on it.


Thank you for the report and the detailed analysis! 
I did not want to get the expansion location since the original code did not 
query that either, so for now I just handle the case when I can not query a 
file entry. This case can occur even when no macros are in the code, for 
example when a PCH is referring to a nonexistent file.


https://reviews.llvm.org/D30691



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to