[PATCH] D48116: [libclang] Allow skipping warnings from all included files
Nikolai Kosjar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 10 07:26:56 PDT 2019
nik marked 4 inline comments as done.
nik added inline comments.
Herald added a subscriber: dexonsmith.
================
Comment at: lib/Frontend/ASTUnit.cpp:682
+ auto &M = D.getSourceManager();
+ return M.isInMainFile(M.getExpansionLoc(D.getLocation()));
+}
----------------
ilya-biryukov wrote:
> `isWrittenInMainFile` might be a better fit: it does not look at presumed locations. That would be the expected behavior in the most common case, i.e. showing errors in an IDE or a text editor.
Oh, good catch! Thanks! :)
================
Comment at: lib/Frontend/ASTUnit.cpp:694
+ if ((!Info.hasSourceManager() || &Info.getSourceManager() == SourceMgr) &&
+ (StoredDiags || StandaloneDiags)) {
+ if (!CaptureNonErrorsFromIncludes
----------------
ilya-biryukov wrote:
> Why do we need this extra check? We checked for StoredDiags and Standalone diags in the body of the statement later again.
Ops, looks like a left-over from a previous version, removed.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D48116/new/
https://reviews.llvm.org/D48116
More information about the cfe-commits
mailing list