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

Unified Diff: tools/clang/rewrite_to_chrome_style/tests/template-original.cc

Issue 2624253002: rewrite_to_chrome_style: Make const decisions aware of const variables (Closed)
Patch Set: consistent-consts-3: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/clang/rewrite_to_chrome_style/tests/template-expected.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/rewrite_to_chrome_style/tests/template-original.cc
diff --git a/tools/clang/rewrite_to_chrome_style/tests/template-original.cc b/tools/clang/rewrite_to_chrome_style/tests/template-original.cc
index 679008290855c179aaf6b4f124228e471c789062..47aef5d85b6c7594312577e1d0aa73381c630986 100644
--- a/tools/clang/rewrite_to_chrome_style/tests/template-original.cc
+++ b/tools/clang/rewrite_to_chrome_style/tests/template-original.cc
@@ -63,6 +63,8 @@ void F() {
const bool complexConst = number || (number + 1);
// A complex statement with a non-const thing is not const.
const bool complexNotConst = number || (g_globalNumber + 1);
+ // A const built from other consts is a const.
+ const bool constFromAConst = complexConst || number;
}
template <int number, typename... T>
« no previous file with comments | « tools/clang/rewrite_to_chrome_style/tests/template-expected.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698