[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 25 05:05:09 PDT 2017

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.


More information about the cfe-commits mailing list