|
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/
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=263082
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+234 lines, -92 lines) |
Patch |
 |
M |
BUILD.gn
|
View
|
|
2 chunks |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/freetype2/BUILD.gn
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
tools/gn/c_include_iterator.h
|
View
|
|
1 chunk |
+18 lines, -7 lines |
0 comments
|
Download
|
 |
M |
tools/gn/c_include_iterator.cc
|
View
|
|
4 chunks |
+39 lines, -16 lines |
0 comments
|
Download
|
 |
M |
tools/gn/c_include_iterator_unittest.cc
|
View
|
|
5 chunks |
+51 lines, -13 lines |
0 comments
|
Download
|
 |
M |
tools/gn/header_checker.h
|
View
|
|
2 chunks |
+7 lines, -2 lines |
0 comments
|
Download
|
 |
M |
tools/gn/header_checker.cc
|
View
|
|
5 chunks |
+68 lines, -25 lines |
0 comments
|
Download
|
 |
M |
tools/gn/header_checker_unittest.cc
|
View
|
|
3 chunks |
+25 lines, -10 lines |
0 comments
|
Download
|
 |
M |
tools/gn/input_conversion.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
tools/gn/input_file_manager.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
tools/gn/input_file_manager.cc
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
tools/gn/variables.cc
|
View
|
|
1 chunk |
+10 lines, -14 lines |
0 comments
|
Download
|
 |
M |
tools/gn/visibility.cc
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
Total messages: 4 (0 generated)
|