summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-07-05 13:30:40 +0000
committerDaniel Jasper <djasper@google.com>2013-07-05 13:30:40 +0000
commit6f9c8d2148b2a031561c93e7dc09268c45a4f746 (patch)
treee6d273643a03a2e97128134518168ccfd36c9e60 /clang/lib
parent23943229f6e951f674490641f7441643862b358f (diff)
downloadbcm5719-llvm-6f9c8d2148b2a031561c93e7dc09268c45a4f746.tar.gz
bcm5719-llvm-6f9c8d2148b2a031561c93e7dc09268c45a4f746.zip
Fix formatting for allocation of new pointer variables.
Before: T **t = new T * ; T **q = new T * (); After: T **t = new T *; T **q = new T *(); llvm-svn: 185699
Diffstat (limited to 'clang/lib')
-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 c2f89ec134c..8db28635e88 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -591,7 +591,8 @@ private:
NameFound = true;
} else if (Current.isOneOf(tok::star, tok::amp, tok::ampamp)) {
Current.Type =
- determineStarAmpUsage(Current, Contexts.back().IsExpression);
+ determineStarAmpUsage(Current, Contexts.back().CanBeExpression &&
+ Contexts.back().IsExpression);
} else if (Current.isOneOf(tok::minus, tok::plus, tok::caret)) {
Current.Type = determinePlusMinusCaretUsage(Current);
} else if (Current.isOneOf(tok::minusminus, tok::plusplus)) {
OpenPOWER on IntegriCloud