diff options
| author | Daniel Jasper <djasper@google.com> | 2013-09-11 20:37:10 +0000 |
|---|---|---|
| committer | Daniel Jasper <djasper@google.com> | 2013-09-11 20:37:10 +0000 |
| commit | 5ca9b7141f5789d38ce03453d731f13b4f864ad9 (patch) | |
| tree | 259f5eed3d6cbd45522bf251e09df154ed8ba8cb /clang/lib/Format | |
| parent | 682ee42550a8e0a24693a075bd3431818e88ce13 (diff) | |
| download | bcm5719-llvm-5ca9b7141f5789d38ce03453d731f13b4f864ad9.tar.gz bcm5719-llvm-5ca9b7141f5789d38ce03453d731f13b4f864ad9.zip | |
clang-format: Fix bug in pointer detection
Before:
for (int i = 0; i* 2 < z; i *= 2) {}
After:
for (int i = 0; i * 2 < z; i *= 2) {}
llvm-svn: 190546
Diffstat (limited to 'clang/lib/Format')
| -rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index f10e68c3405..dec631fcfb3 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -574,7 +574,7 @@ private: (!Current.Previous || Current.Previous->isNot(tok::kw_operator))) { Contexts.back().IsExpression = true; for (FormatToken *Previous = Current.Previous; - Previous && Previous->isNot(tok::comma); + Previous && !Previous->isOneOf(tok::comma, tok::semi); Previous = Previous->Previous) { if (Previous->is(tok::r_square)) Previous = Previous->MatchingParen; |

