Chromium Code Reviews| 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 db208abc2f762e0a7848ddb5f3700cb21743c46f..08ce7b7871d365c8a0fd54abea57029fba727aa8 100644 |
| --- a/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp |
| +++ b/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp |
| @@ -111,7 +111,10 @@ bool GetNameForDecl(const clang::FieldDecl& decl, |
| original_name.substr(strlen(kBlinkFieldPrefix))); |
| // The few examples I could find used struct-style naming with no `_` suffix |
| // for unions. |
| - if (decl.getParent()->isClass()) |
| + bool c = decl.getParent()->isClass(); |
| + // There appears to be a GCC bug that makes this branch incorrectly if we |
| + // don't use a temp variable!! Clang works right. crbug.com/580745 |
| + if (c) |
|
dcheng
2016/01/27 23:46:15
This gives me the heebie jeebies. I feel like we s
danakj
2016/01/27 23:51:01
Ya, I'm sure there's other bugs happening elsewher
|
| name += '_'; |
| return true; |
| } |