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

Unified Diff: tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp

Issue 2626923004: rewrite_to_chrome_style: Use constexpr as backdoor to get consistency (Closed)
Patch Set: 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 | « third_party/WebKit/Source/platform/heap/TraceTraits.h ('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/RewriteToChromeStyle.cpp
diff --git a/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp b/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp
index 2d6713c89c9e4f31f96272c6b64e9e5f95b494f9..5df98a529aea727ad79d3e991669a5db34c12b36 100644
--- a/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp
+++ b/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp
@@ -475,6 +475,9 @@ bool IsProbablyConst(const clang::VarDecl& decl,
if (type.isVolatileQualified())
return false;
+ if (decl.isConstexpr())
+ return true;
+
// Parameters should not be renamed to |kFooBar| style (even if they are
// const and have an initializer (aka default value)).
if (clang::isa<clang::ParmVarDecl>(&decl))
« no previous file with comments | « third_party/WebKit/Source/platform/heap/TraceTraits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698