Summary: | Rename <wtf/unicode/UTF8.h> to <wtf/unicode/UTF8Conversion.h> in order to avoid conflicting with ICU's unicode/utf8.h | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Fujii Hironori <Hironori.Fujii> | ||||
Component: | New Bugs | Assignee: | Fujii Hironori <Hironori.Fujii> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | don.olmstead, ews-watchlist, webkit-bug-importer, ysuzuki | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 171618 | ||||||
Attachments: |
|
Description
Fujii Hironori
2018-09-18 00:00:27 PDT
https://msdn.microsoft.com/en-us/library/36k2cdd4.aspx > For include files that are specified as #include "path-spec", > directory searching begins with the directory of the parent file > and then proceeds through the directories of any grandparent > files. That is, searching begins relative to the directory that > contains the source file that contains the #include directive > that's being processed. If there is no grandparent file and the > file has not been found, the search continues as if the file name > were enclosed in angle brackets. Isn't the larger problem that Source/WTF/wtf is being used as an include directory? (In reply to Don Olmstead from comment #2) > Isn't the larger problem that Source/WTF/wtf is being used as an include > directory? It is another problem should be fixed. But, it is not the main problem. The main problem is the MSVC quirks (Comment 1). It happens in following conditions: 1. ICU's header unicode/utf.h has '#include "unicode/utf8.h"' not '<unicode/utf8.h>' 2. ParkingLot.cpp indirectly includes unicode/utf.h 3. There is unicode/UTF8.h in WTF relative to the grand-grand-... parent ParkingLot.cpp This is not a Clang-cl warning problem, but also MSVC builds have this issue. Here is the build log of compiling ParkingLot.cpp with /showIncludes in WebKit WinCairo port with MSVC. https://gist.github.com/fujii/a4a72fd3581e6b38962706b60e77d75c > 1>Note: including file: C:\webkit\ga\WebKitLibraries\win\include\unicode/utf.h > 1>Note: including file: c:\webkit\ga\source\wtf\wtf\unicode/utf8.h wtf/unicode/UTF8.h is included by unicode/utf.h. Created attachment 353584 [details]
Patch
Attachment 353584 [details] did not pass style-queue:
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:28: Found other header before a header this file implements. Should be: config.h, primary header, blank line, and then alphabetically sorted. [build/include_order] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:29: Alphabetical sorting problem. [build/include_order] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:65: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:122: Should have only a single space after a punctuation in a comment. [whitespace/comments] [5]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:221: One line control clauses should not use braces. [whitespace/braces] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:234: A case label should not be indented, but line up with its switch statement. [whitespace/indent] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:234: More than one command on the same line [whitespace/newline] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:235: More than one command on the same line [whitespace/newline] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:236: More than one command on the same line [whitespace/newline] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:247: Should have only a single space after a punctuation in a comment. [whitespace/comments] [5]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:254: A case label should not be indented, but line up with its switch statement. [whitespace/indent] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:256: More than one command on the same line [whitespace/newline] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:256: More than one command on the same line in if [whitespace/parens] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:257: More than one command on the same line [whitespace/newline] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:257: More than one command on the same line in if [whitespace/parens] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:258: More than one command on the same line in if [whitespace/parens] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:262: A case label should not be indented, but line up with its switch statement. [whitespace/indent] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:262: More than one command on the same line in if [whitespace/parens] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:263: More than one command on the same line in if [whitespace/parens] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:264: More than one command on the same line in if [whitespace/parens] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:265: More than one command on the same line in if [whitespace/parens] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:266: More than one command on the same line in if [whitespace/parens] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:270: More than one command on the same line in if [whitespace/parens] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:288: A case label should not be indented, but line up with its switch statement. [whitespace/indent] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:288: More than one command on the same line [whitespace/newline] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:289: More than one command on the same line [whitespace/newline] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:290: More than one command on the same line [whitespace/newline] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:291: More than one command on the same line [whitespace/newline] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:292: More than one command on the same line [whitespace/newline] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:330: An else statement can be removed when the prior "if" concludes with a return, break, continue or goto statement. [readability/control_flow] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.cpp:414: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.h:37: Code inside a namespace should not be indented. [whitespace/indent] [4]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.h:45: One space before end of line comments [whitespace/comments] [5]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.h:45: When wrapping a line, only indent 4 spaces. [whitespace/indent] [3]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.h:46: One space before end of line comments [whitespace/comments] [5]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.h:47: One space before end of line comments [whitespace/comments] [5]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.h:48: One space before end of line comments [whitespace/comments] [5]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.h:53: Should have only a single space after a punctuation in a comment. [whitespace/comments] [5]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.h:66: When wrapping a line, only indent 4 spaces. [whitespace/indent] [3]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.h:70: When wrapping a line, only indent 4 spaces. [whitespace/indent] [3]
ERROR: Source/WTF/wtf/unicode/UTF8Conversion.h:74: When wrapping a line, only indent 4 spaces. [whitespace/indent] [3]
Total errors found: 41 in 20 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 353584 [details]
Patch
r=me
Comment on attachment 353584 [details] Patch Clearing flags on attachment: 353584 Committed r237714: <https://trac.webkit.org/changeset/237714> All reviewed patches have been landed. Closing bug. |