Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Issue 2616213003: Get more consistent decisions if a statement is constant in templates (Closed)

Created:
3 years, 11 months ago by danakj
Modified:
3 years, 11 months ago
Reviewers:
dcheng
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Get more consistent decisions if a statement is constant in templates The tool was saying some template-dependent values were both const and not const because when the template parameters meet some criteria it collapses them out of the AST. If we always check the entire subtree of expressions to verify they are evaluatable we get more consistent results. Also don't try to turn this_type_of_name into kThisTypeOfName, as the author explicitly wrote it that way and we end up with the ever fun kThis_type_of_name instead. R=dcheng@chromium.org BUG=677285 Review-Url: https://codereview.chromium.org/2616213003 Cr-Commit-Position: refs/heads/master@{#442262} Committed: https://chromium.googlesource.com/chromium/src/+/b9a1485ee7f50c3980f8055d8f64ea4d30220720

Patch Set 1 #

Total comments: 7

Patch Set 2 : consistant-consts #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -28 lines) Patch
M tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp View 3 chunks +42 lines, -12 lines 0 comments Download
M tools/clang/rewrite_to_chrome_style/tests/constants-expected.cc View 1 1 chunk +4 lines, -4 lines 0 comments Download
M tools/clang/rewrite_to_chrome_style/tests/constants-original.cc View 1 1 chunk +4 lines, -4 lines 0 comments Download
M tools/clang/rewrite_to_chrome_style/tests/template-expected.cc View 2 chunks +37 lines, -4 lines 0 comments Download
M tools/clang/rewrite_to_chrome_style/tests/template-original.cc View 2 chunks +36 lines, -4 lines 0 comments Download

Messages

Total messages: 20 (11 generated)
danakj
3 years, 11 months ago (2017-01-07 00:37:56 UTC) #1
dcheng
https://codereview.chromium.org/2616213003/diff/1/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp File tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp (right): https://codereview.chromium.org/2616213003/diff/1/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp#newcode374 tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp:374: // If the statement is not an expression then ...
3 years, 11 months ago (2017-01-07 00:45:49 UTC) #3
danakj
PTAL https://codereview.chromium.org/2616213003/diff/1/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp File tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp (right): https://codereview.chromium.org/2616213003/diff/1/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp#newcode374 tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp:374: // If the statement is not an expression ...
3 years, 11 months ago (2017-01-07 00:48:00 UTC) #4
dcheng
LGTM with comment addressed https://codereview.chromium.org/2616213003/diff/1/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp File tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp (right): https://codereview.chromium.org/2616213003/diff/1/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp#newcode374 tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp:374: // If the statement is ...
3 years, 11 months ago (2017-01-07 00:50:18 UTC) #7
danakj
https://codereview.chromium.org/2616213003/diff/1/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp File tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp (right): https://codereview.chromium.org/2616213003/diff/1/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp#newcode374 tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp:374: // If the statement is not an expression then ...
3 years, 11 months ago (2017-01-09 16:01:33 UTC) #10
danakj
https://codereview.chromium.org/2616213003/diff/1/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp File tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp (right): https://codereview.chromium.org/2616213003/diff/1/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp#newcode390 tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp:390: if (!CanBeEvaluatedAtCompileTime(child, context)) IE here child is not an ...
3 years, 11 months ago (2017-01-09 16:01:51 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2616213003/20001
3 years, 11 months ago (2017-01-09 16:02:26 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2616213003/20001
3 years, 11 months ago (2017-01-09 16:24:22 UTC) #17
commit-bot: I haz the power
3 years, 11 months ago (2017-01-09 16:30:07 UTC) #20
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/b9a1485ee7f50c3980f8055d8f64...

Powered by Google App Engine
This is Rietveld 408576698