[PATCH] D43778: [clang-tidy] Adding RestrictIncludes check to Fuchsia module

Julie Hockett via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 9 11:55:25 PDT 2018


juliehockett added inline comments.


================
Comment at: docs/ReleaseNotes.rst:116
+
+  Checks for allowed system includes and suggests removal of any others. If no
+  includes are specified, the check will exit without issuing any warnings.
----------------
Eugene.Zelenko wrote:
> Is it necessary to highlight that warnings will not be emitted in case of disallowed headers are not found? Same in documentation.
I'm not sure I understand what you're saying...are you saying if the documentation should not include anything about  what happens in the case of no headers?


================
Comment at: docs/clang-tidy/checks/fuchsia-restrict-system-includes.rst:32
+   A string containing a semi-colon separated list of allowed include filenames.
+   The default is an empty string, which allows all includes.
----------------
aaron.ballman wrote:
> This default seems a bit odd to me, but perhaps it's fine. What's novel is that the check is a no-op by default, so how do Fuchsia developers get the correct list? Or is there no canonical list and developers are expected to populate their own manually?
The idea is that it's a case-by-case basis -- this may change at some point in the future if we decide there's a standard whitelist of system includes across the board, but at the moment the thought is to allow everything in some places, and use this check to limit them in others. It'll need to be populated on a case-by-case basis, since different directories will have different requirements.


https://reviews.llvm.org/D43778





More information about the cfe-commits mailing list