summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/TokenAnnotator.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-11-14 17:26:49 +0000
committerDaniel Jasper <djasper@google.com>2014-11-14 17:26:49 +0000
commitd127e3b6af0559331ac9c16f5e100e69501fc818 (patch)
treebcfa8cacb61d1e1d3959bffc726bd67877236448 /clang/lib/Format/TokenAnnotator.cpp
parentb7859ddf9bdc2b8ef689036fadb4501cf22d79f4 (diff)
downloadbcm5719-llvm-d127e3b6af0559331ac9c16f5e100e69501fc818.tar.gz
bcm5719-llvm-d127e3b6af0559331ac9c16f5e100e69501fc818.zip
clang-format: Correctly detect multiplication in ctor initializer.
Before: Constructor() : a(a), area(width *height) {} After: Constructor() : a(a), area(width * height) {} llvm-svn: 222010
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 5234de2bb7d..104eb1d7afb 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -763,7 +763,7 @@ private:
Previous && Previous->isOneOf(tok::star, tok::amp);
Previous = Previous->Previous)
Previous->Type = TT_PointerOrReference;
- Contexts.back().IsExpression = false;
+ Contexts.back().IsExpression = Contexts.back().InCtorInitializer;
} else if (Current.Previous &&
Current.Previous->Type == TT_CtorInitializerColon) {
Contexts.back().IsExpression = true;
OpenPOWER on IntegriCloud