summaryrefslogtreecommitdiffstats
path: root/tools/gn/input_file_manager.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-10 21:13:05 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-10 21:13:05 +0000
commitfce5c3fe5e0ee8346f565305f35c08e86584c9e2 (patch)
tree823bd2732e4e7e36de6750f4a44f946cbd1ed15e /tools/gn/input_file_manager.h
parenta429d3a9cfb8035963d5ebaa2630609f513958ea (diff)
downloadchromium_src-fce5c3fe5e0ee8346f565305f35c08e86584c9e2.zip
chromium_src-fce5c3fe5e0ee8346f565305f35c08e86584c9e2.tar.gz
chromium_src-fce5c3fe5e0ee8346f565305f35c08e86584c9e2.tar.bz2
Improve GN public header file checking
This makes the header checker and include iterator work from InputFiles (which basically just hold the file buffer) rather than just raw strings. This allows us to reference these files from Err. Some extra line/char tracking is now in the include iterator so we can actually quote from and annotate the place in the source file where the bad include is, which looks much nicer than "the file blah included blah". It also makes it possible to write much shorter error messages that still make sense. This adds visibility checking as previously documented in the help for "public" and a unit test for that. This updates the documentation for "public" which was wrong (it referred to patterns which was not used). R=scottmg@chromium.org Reland of https://codereview.chromium.org/229423002/ Review URL: https://codereview.chromium.org/231813002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@263082 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gn/input_file_manager.h')
-rw-r--r--tools/gn/input_file_manager.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/gn/input_file_manager.h b/tools/gn/input_file_manager.h
index 5c5b5b0..82b3cc5 100644
--- a/tools/gn/input_file_manager.h
+++ b/tools/gn/input_file_manager.h
@@ -79,7 +79,8 @@ class InputFileManager : public base::RefCountedThreadSafe<InputFileManager> {
// the values and lose context for error reporting, or somehow keep the
// associated parse nodes, tokens, and file data in memory. This function
// allows the latter.
- void AddDynamicInput(InputFile** file,
+ void AddDynamicInput(const SourceFile& name,
+ InputFile** file,
std::vector<Token>** tokens,
scoped_ptr<ParseNode>** parse_root);