summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-11-17 13:55:04 +0000
committerDaniel Jasper <djasper@google.com>2014-11-17 13:55:04 +0000
commit6a3fd8361fcf385d1b85813cd2fc423417182030 (patch)
tree5dd9580c074fb1e4e09a99f971e14efc68174a01 /clang/lib/Format
parentb412e529e209fe31d919902d4866c33e177b81e7 (diff)
downloadbcm5719-llvm-6a3fd8361fcf385d1b85813cd2fc423417182030.tar.gz
bcm5719-llvm-6a3fd8361fcf385d1b85813cd2fc423417182030.zip
clang-format: Fix regression introduced in r221609.
Before: void f() { f(a, c *d); } After: void f() { f(a, c * d); } llvm-svn: 222128
Diffstat (limited to 'clang/lib/Format')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 74fb0f7a727..864f60dee62 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -763,7 +763,8 @@ private:
Previous && Previous->isOneOf(tok::star, tok::amp);
Previous = Previous->Previous)
Previous->Type = TT_PointerOrReference;
- Contexts.back().IsExpression = Contexts.back().InCtorInitializer;
+ if (Line.MustBeDeclaration)
+ Contexts.back().IsExpression = Contexts.back().InCtorInitializer;
} else if (Current.Previous &&
Current.Previous->Type == TT_CtorInitializerColon) {
Contexts.back().IsExpression = true;
OpenPOWER on IntegriCloud