diff options
author | tfarina <tfarina@chromium.org> | 2015-03-01 19:07:15 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-02 03:08:02 +0000 |
commit | dc6279e30a3549ecb2fcab0596e05dc59d355d52 (patch) | |
tree | 43b3b4821d645f1690a16348560202275e23a40c /tools/gn/c_include_iterator.h | |
parent | d62d851ee66c30eb639d9309b7e17631bbbfd354 (diff) | |
download | chromium_src-dc6279e30a3549ecb2fcab0596e05dc59d355d52.zip chromium_src-dc6279e30a3549ecb2fcab0596e05dc59d355d52.tar.gz chromium_src-dc6279e30a3549ecb2fcab0596e05dc59d355d52.tar.bz2 |
tools/gn: Fix errors found by Facebook's flint tool.
Example of warnings/errors/advices:
tools/gn/exec_process.h:5: Missing include guard. If you are ABSOLUTELY
sure that you don't want an include guard, then include a comment
containing override-include-guard in lieu of an include guard.
tools/gn/ninja_binary_target_writer.cc:50: Single-argument constructor
'IncludeWriter(PathOutput& path_output)' may inadvertently be used as a
type conversion constructor. Prefix the function with the 'explicit'
keyword to avoid this, or add an /* implicit */ comment to suppress this
warning.
tools/gn/standard_out.cc:98: Advice: Prefer `nullptr' to `NULL' in new
C++ code. Unlike `NULL', `nullptr' can't accidentally be used in
arithmetic or as an integer. See
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf for
details.
tools/gn/tutorial/hello.cc:7: The associated header file of .cpp files
should be included before any other includes.
tools/gn/target_generator.h:16: Warning: Base class TargetGenerator has
virtual functions but a public non-virtual destructor.
The errors were found with the following command line:
$ flint --recusive tools/gn
And cleaned up until silenced with:
$ gn gen out-gn
$ ninja -C out-gn gn gn_unittests
BUG=None
TEST=see above
R=scottmg@chromium.org,brettw@chromium.org
Review URL: https://codereview.chromium.org/964203002
Cr-Commit-Position: refs/heads/master@{#318639}
Diffstat (limited to 'tools/gn/c_include_iterator.h')
-rw-r--r-- | tools/gn/c_include_iterator.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/gn/c_include_iterator.h b/tools/gn/c_include_iterator.h index 41c1246..86c5ede 100644 --- a/tools/gn/c_include_iterator.h +++ b/tools/gn/c_include_iterator.h @@ -18,7 +18,7 @@ class LocationRange; class CIncludeIterator { public: // The InputFile pointed to must outlive this class. - CIncludeIterator(const InputFile* input); + explicit CIncludeIterator(const InputFile* input); ~CIncludeIterator(); // Fills in the string with the contents of the next include, and the |