r179677 - Extended VerifyDiagnosticConsumer to also verify source file for diagnostic.
jordan_rose at apple.com
Wed Apr 17 10:14:55 PDT 2013
On Apr 17, 2013, at 1:06 , Andy Gibbs <andyg1001 at hotmail.co.uk> wrote:
> + // Lookup file via Preprocessor, like a #include.
> + const DirectoryLookup *CurDir;
> + const FileEntry *FE = PP->LookupFile(Filename, false, NULL, CurDir,
> + NULL, NULL, 0);
This seems a bit awkward...what if the file is included on the command line with -include? (Some of our tests do this.)
I guess it works. I was just expecting something like a last-path-component match, using, say, a search over fileinfo_begin()/_end() in SourceManager.
> + if (PH.Next(Line) && Line > 0)
> + ExpectedLoc = SM.translateFileLineCol(FE, Line, 1);
This should probably be asserted or checked; it doesn't make sense to specify another file without a line number.
I'll look into the 79/80 issue too. Thanks for doing this!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits