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

Unified Diff: tools/clang/rewrite_to_chrome_style/tests/template-expected.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
Index: tools/clang/rewrite_to_chrome_style/tests/template-expected.cc
diff --git a/tools/clang/rewrite_to_chrome_style/tests/template-expected.cc b/tools/clang/rewrite_to_chrome_style/tests/template-expected.cc
index 4f339ee16bcbc3ff21407204af95da2e4a08109a..5c9103d9420183593442e72bb47d7f7fe8e17bf9 100644
--- a/tools/clang/rewrite_to_chrome_style/tests/template-expected.cc
+++ b/tools/clang/rewrite_to_chrome_style/tests/template-expected.cc
@@ -64,6 +64,8 @@ void F() {
const bool kComplexConst = number || (number + 1);
// A complex statement with a non-const thing is not const.
const bool complex_not_const = number || (g_global_number + 1);
+ // A const built from other consts is a const.
+ const bool kConstFromAConst = kComplexConst || number;
}
template <int number, typename... T>

Powered by Google App Engine
This is Rietveld 408576698