|
|
Chromium Code Reviews
Descriptionclang plugin: Compute absolute paths on Windows as well.
The motivation is to suppress diagnostics on the v8 bot,
which have "v8" somewhere on the path, but not in the
filename segments the compiler sees. This makes the
behavior on Windows match the behavior on non-Windows.
BUG=644096
NOTRY=true
Committed: https://crrev.com/df0eb747fca2699d116ad80d0ccbd967317fdbd4
Committed: https://crrev.com/681568d4e7a08a988d677d8ad76d79faf87e7d2e
Cr-Original-Commit-Position: refs/heads/master@{#417701}
Cr-Commit-Position: refs/heads/master@{#417804}
Patch Set 1 #Patch Set 2 : . #Patch Set 3 : compile #
Total comments: 2
Patch Set 4 : simpler #
Total comments: 7
Patch Set 5 : W #Patch Set 6 : less mental energy for dcheng #Patch Set 7 : relan #Messages
Total messages: 40 (24 generated)
Description was changed from ========== clang plugin: Compute absolute paths on Windows as well. BUG=644096 ========== to ========== clang plugin: Compute absolute paths on Windows as well. The motivation is to suppress diagnostics on the v8 bot, which have "v8" somewhere on the path, but not in the filename segments the compiler sees. This makes the behavior on Windows match the behavior on non-Windows. BUG=644096 ==========
thakis@chromium.org changed reviewers: + dcheng@chromium.org, hans@chromium.org
The CQ bit was checked by thakis@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2318733002/diff/40001/tools/clang/plugins/Chr... File tools/clang/plugins/ChromeClassTester.cpp (right): https://codereview.chromium.org/2318733002/diff/40001/tools/clang/plugins/Chr... tools/clang/plugins/ChromeClassTester.cpp:143: // Use vector instead of string because string doesn't guarantee continuous According to my thorough scientific research of Google results, C++11 requires contiguous storage for string.
https://codereview.chromium.org/2318733002/diff/40001/tools/clang/plugins/Chr... File tools/clang/plugins/ChromeClassTester.cpp (right): https://codereview.chromium.org/2318733002/diff/40001/tools/clang/plugins/Chr... tools/clang/plugins/ChromeClassTester.cpp:143: // Use vector instead of string because string doesn't guarantee continuous On 2016/09/09 17:20:57, dcheng wrote: > According to my thorough scientific research of Google results, C++11 requires > contiguous storage for string. Done. (Why didn't the make data() return non-const char*? :-/)
The CQ bit was checked by thakis@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2318733002/diff/60001/tools/clang/plugins/Chr... File tools/clang/plugins/ChromeClassTester.cpp (right): https://codereview.chromium.org/2318733002/diff/60001/tools/clang/plugins/Chr... tools/clang/plugins/ChromeClassTester.cpp:145: std::wstring utf16(size_needed, 0); Nit: '\0' maybe, for slightly better clarity? https://codereview.chromium.org/2318733002/diff/60001/tools/clang/plugins/Chr... tools/clang/plugins/ChromeClassTester.cpp:149: size_needed = GetFullPathName(utf16.data(), 0, nullptr, nullptr) + 1; // nul Nit: let's be consistent about calling the W versions. https://codereview.chromium.org/2318733002/diff/60001/tools/clang/plugins/Chr... tools/clang/plugins/ChromeClassTester.cpp:149: size_needed = GetFullPathName(utf16.data(), 0, nullptr, nullptr) + 1; // nul Also: If the lpBuffer buffer is too small to contain the path, the return value is the size, in TCHARs, of the buffer that is required to hold the path and the terminating null character. So I think this already includes the terminating null.
https://codereview.chromium.org/2318733002/diff/60001/tools/clang/plugins/Chr... File tools/clang/plugins/ChromeClassTester.cpp (right): https://codereview.chromium.org/2318733002/diff/60001/tools/clang/plugins/Chr... tools/clang/plugins/ChromeClassTester.cpp:145: std::wstring utf16(size_needed, 0); On 2016/09/09 18:57:29, dcheng wrote: > Nit: '\0' maybe, for slightly better clarity? meh, it's overwritten below anyways. And wouldn't it have to be L'\0'? https://codereview.chromium.org/2318733002/diff/60001/tools/clang/plugins/Chr... tools/clang/plugins/ChromeClassTester.cpp:149: size_needed = GetFullPathName(utf16.data(), 0, nullptr, nullptr) + 1; // nul On 2016/09/09 18:57:29, dcheng wrote: > Nit: let's be consistent about calling the W versions. Oh oops, done, thanks! https://codereview.chromium.org/2318733002/diff/60001/tools/clang/plugins/Chr... tools/clang/plugins/ChromeClassTester.cpp:149: size_needed = GetFullPathName(utf16.data(), 0, nullptr, nullptr) + 1; // nul On 2016/09/09 18:57:29, dcheng wrote: > Also: > > If the lpBuffer buffer is too small to contain the path, the return value is the > size, in TCHARs, of the buffer that is required to hold the path and the > terminating null character. > > So I think this already includes the terminating null. You're right, I misread the docs. Done.
The CQ bit was checked by thakis@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
lgtm https://codereview.chromium.org/2318733002/diff/60001/tools/clang/plugins/Chr... File tools/clang/plugins/ChromeClassTester.cpp (right): https://codereview.chromium.org/2318733002/diff/60001/tools/clang/plugins/Chr... tools/clang/plugins/ChromeClassTester.cpp:145: std::wstring utf16(size_needed, 0); On 2016/09/09 19:06:33, Nico wrote: > On 2016/09/09 18:57:29, dcheng wrote: > > Nit: '\0' maybe, for slightly better clarity? > > meh, it's overwritten below anyways. And wouldn't it have to be L'\0'? I think '\0' should work fine here: the L prefix is only a problem for string literals since the pointer types aren't convertible. (It's just a visual hint to the reader that the first parameter is the count: even though we're passing a named variable as the count, there's still a bare 0 integer literal right next to it, so it takes me a little extra mental energy to remember that this is a character, not NULL or a count of some other sort)
The CQ bit was checked by thakis@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from dcheng@chromium.org Link to the patchset: https://codereview.chromium.org/2318733002/#ps100001 (title: "less mental energy for dcheng")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Thanks!
On 2016/09/09 19:25:28, Nico wrote: > Thanks! Thanks, sorry I'm bad at remembering std::string's constructors =P
The CQ bit was unchecked by thakis@chromium.org
Description was changed from ========== clang plugin: Compute absolute paths on Windows as well. The motivation is to suppress diagnostics on the v8 bot, which have "v8" somewhere on the path, but not in the filename segments the compiler sees. This makes the behavior on Windows match the behavior on non-Windows. BUG=644096 ========== to ========== clang plugin: Compute absolute paths on Windows as well. The motivation is to suppress diagnostics on the v8 bot, which have "v8" somewhere on the path, but not in the filename segments the compiler sees. This makes the behavior on Windows match the behavior on non-Windows. BUG=644096 NOTRY=true ==========
The CQ bit was checked by thakis@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== clang plugin: Compute absolute paths on Windows as well. The motivation is to suppress diagnostics on the v8 bot, which have "v8" somewhere on the path, but not in the filename segments the compiler sees. This makes the behavior on Windows match the behavior on non-Windows. BUG=644096 NOTRY=true ========== to ========== clang plugin: Compute absolute paths on Windows as well. The motivation is to suppress diagnostics on the v8 bot, which have "v8" somewhere on the path, but not in the filename segments the compiler sees. This makes the behavior on Windows match the behavior on non-Windows. BUG=644096 NOTRY=true ==========
Message was sent while issue was closed.
Committed patchset #6 (id:100001)
Message was sent while issue was closed.
Description was changed from ========== clang plugin: Compute absolute paths on Windows as well. The motivation is to suppress diagnostics on the v8 bot, which have "v8" somewhere on the path, but not in the filename segments the compiler sees. This makes the behavior on Windows match the behavior on non-Windows. BUG=644096 NOTRY=true ========== to ========== clang plugin: Compute absolute paths on Windows as well. The motivation is to suppress diagnostics on the v8 bot, which have "v8" somewhere on the path, but not in the filename segments the compiler sees. This makes the behavior on Windows match the behavior on non-Windows. BUG=644096 NOTRY=true Committed: https://crrev.com/df0eb747fca2699d116ad80d0ccbd967317fdbd4 Cr-Commit-Position: refs/heads/master@{#417701} ==========
Message was sent while issue was closed.
Patchset 6 (id:??) landed as https://crrev.com/df0eb747fca2699d116ad80d0ccbd967317fdbd4 Cr-Commit-Position: refs/heads/master@{#417701}
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:100001) has been created in https://codereview.chromium.org/2323273004/ by hans@chromium.org. The reason for reverting is: The bots are sad. From https://build.chromium.org/p/chromium.fyi/builders/ClangToTLinux%20%28dbg%29/... /b/c/b/ClangToTLinux__dbg_/src/tools/clang/plugins/ChromeClassTester.cpp: In member function ‘bool ChromeClassTester::InBannedDirectory(clang::SourceLocation)’: /b/c/b/ClangToTLinux__dbg_/src/tools/clang/plugins/ChromeClassTester.cpp:129:41: error: ‘resolvedPath’ was not declared in this scope } else if (realpath(filename.c_str(), resolvedPath)) { ^ /b/c/b/ClangToTLinux__dbg_/src/tools/clang/plugins/ChromeClassTester.cpp:130:33: error: redeclaration of ‘char resolvedPath [4096]’ char resolvedPath[MAXPATHLEN]; ^ /b/c/b/ClangToTLinux__dbg_/src/tools/clang/plugins/ChromeClassTester.cpp:129:41: error: ‘<typeprefixerror>resolvedPath’ previously declared here } else if (realpath(filename.c_str(), resolvedPath)) { ^.
Message was sent while issue was closed.
Description was changed from ========== clang plugin: Compute absolute paths on Windows as well. The motivation is to suppress diagnostics on the v8 bot, which have "v8" somewhere on the path, but not in the filename segments the compiler sees. This makes the behavior on Windows match the behavior on non-Windows. BUG=644096 NOTRY=true Committed: https://crrev.com/df0eb747fca2699d116ad80d0ccbd967317fdbd4 Cr-Commit-Position: refs/heads/master@{#417701} ========== to ========== clang plugin: Compute absolute paths on Windows as well. The motivation is to suppress diagnostics on the v8 bot, which have "v8" somewhere on the path, but not in the filename segments the compiler sees. This makes the behavior on Windows match the behavior on non-Windows. BUG=644096 NOTRY=true Committed: https://crrev.com/df0eb747fca2699d116ad80d0ccbd967317fdbd4 Cr-Commit-Position: refs/heads/master@{#417701} ==========
The CQ bit was checked by thakis@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from dcheng@chromium.org Link to the patchset: https://codereview.chromium.org/2318733002/#ps120001 (title: "relan")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== clang plugin: Compute absolute paths on Windows as well. The motivation is to suppress diagnostics on the v8 bot, which have "v8" somewhere on the path, but not in the filename segments the compiler sees. This makes the behavior on Windows match the behavior on non-Windows. BUG=644096 NOTRY=true Committed: https://crrev.com/df0eb747fca2699d116ad80d0ccbd967317fdbd4 Cr-Commit-Position: refs/heads/master@{#417701} ========== to ========== clang plugin: Compute absolute paths on Windows as well. The motivation is to suppress diagnostics on the v8 bot, which have "v8" somewhere on the path, but not in the filename segments the compiler sees. This makes the behavior on Windows match the behavior on non-Windows. BUG=644096 NOTRY=true Committed: https://crrev.com/df0eb747fca2699d116ad80d0ccbd967317fdbd4 Cr-Commit-Position: refs/heads/master@{#417701} ==========
Message was sent while issue was closed.
Committed patchset #7 (id:120001)
Message was sent while issue was closed.
Description was changed from ========== clang plugin: Compute absolute paths on Windows as well. The motivation is to suppress diagnostics on the v8 bot, which have "v8" somewhere on the path, but not in the filename segments the compiler sees. This makes the behavior on Windows match the behavior on non-Windows. BUG=644096 NOTRY=true Committed: https://crrev.com/df0eb747fca2699d116ad80d0ccbd967317fdbd4 Cr-Commit-Position: refs/heads/master@{#417701} ========== to ========== clang plugin: Compute absolute paths on Windows as well. The motivation is to suppress diagnostics on the v8 bot, which have "v8" somewhere on the path, but not in the filename segments the compiler sees. This makes the behavior on Windows match the behavior on non-Windows. BUG=644096 NOTRY=true Committed: https://crrev.com/df0eb747fca2699d116ad80d0ccbd967317fdbd4 Committed: https://crrev.com/681568d4e7a08a988d677d8ad76d79faf87e7d2e Cr-Original-Commit-Position: refs/heads/master@{#417701} Cr-Commit-Position: refs/heads/master@{#417804} ==========
Message was sent while issue was closed.
Patchset 7 (id:??) landed as https://crrev.com/681568d4e7a08a988d677d8ad76d79faf87e7d2e Cr-Commit-Position: refs/heads/master@{#417804} |
