Index: tools/clang/rewrite_to_chrome_style/tests/constants-expected.cc |
diff --git a/tools/clang/rewrite_to_chrome_style/tests/constants-expected.cc b/tools/clang/rewrite_to_chrome_style/tests/constants-expected.cc |
index 0d02e9b8886dd13475851ba6ba6fc6b42b4f2236..e6b233babee959fa6ea443f9eb25862c0953de0d 100644 |
--- a/tools/clang/rewrite_to_chrome_style/tests/constants-expected.cc |
+++ b/tools/clang/rewrite_to_chrome_style/tests/constants-expected.cc |
@@ -25,6 +25,19 @@ class C { |
// Not a constant even though it has static storage duration. |
static const char* current_event_; |
+ |
+ static int Function(); |
+ |
+ static void FunctionWithConstant() { |
+ const int kFunctionConstant = 4; |
+ const int kFunctionConstantFromExpression = 4 + 6; |
+ const int kFunctionConstantFromOtherConsts = |
+ kFunctionConstant + kFunctionConstantFromExpression; |
+ const int kShouldBeRenamedToAConst = 9 - 2; |
+ const int kShouldAlsoBeRenamedToAConst = |
+ kFunctionConstant + kFunctionConstantFromOtherConsts; |
+ const int not_compile_time_const = kFunctionConstant + Function(); |
+ } |
}; |
void F() { |