This is an archive of the discontinued LLVM Phabricator instance.

Do not print certain warnings when input is a header.
AbandonedPublic

Authored by erikjv on Jan 6 2016, 7:34 AM.

Details

Reviewers
klimek
rsmith
Summary

When generating pre-compiled headers, or when opening a header file with
libclang, suppress the warnings "#pragma once in main file" and
"#include_next in primary source file".

Fixes PR16686 and PR24390.

Diff Detail

Event Timeline

erikjv updated this revision to Diff 44121.Jan 6 2016, 7:34 AM
erikjv retitled this revision from to Do not print certain warnings when input is a header..
erikjv updated this object.
erikjv added reviewers: klimek, rsmith.
erikjv added a subscriber: cfe-commits.
mehdi_amini added inline comments.
include/clang/Basic/SourceManager.h
660 ↗(On Diff #44121)

Document?

764 ↗(On Diff #44121)

Variable should start with a capital

include/clang/Frontend/FrontendOptions.h
91 ↗(On Diff #44121)

Document

erikjv updated this revision to Diff 60023.Jun 8 2016, 6:24 AM
aaron.ballman added inline comments.
include/clang/Basic/LangOptions.h
131

Should move the initializer to the constructor (not certain that MSVC 2013 supports this construct, but it's also more consistent).

mehdi_amini added inline comments.Jul 5 2016, 11:29 AM
include/clang/Basic/LangOptions.h
131

Interestingly I prefer to have them on the fields themselves (when writing new struct/classes), but I agree that consistency takes precedence when adding a field to an existing class.

erikjv abandoned this revision.Oct 18 2016, 6:52 AM