Allow -verify to be used with files that don't have an associated FileEntry.
In Debug builds, VerifyDiagnosticConsumer checks any files with diagnostics to make sure we got the chance to parse them for directives (expected-warning and friends). This check previously relied on every parsed file having a FileEntry, which broke the cling interpreter's test suite. This commit changes the extra debug checking to mark a file as unparsed as soon as we see a diagnostic from that file. At the very end, any files that are still marked as unparsed are checked for directives, and a fatal error is emitted (as before) if we find out that there were directives we missed. -verify directives should always live in actual parsed files, not in PCH or AST files. Patch by Andy Gibbs, with slight modifications by me. llvm-svn: 162171
Loading
Please register or sign in to comment