aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/Format.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r--lib/Format/Format.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index d95deb5704..2952067c39 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -1256,8 +1256,10 @@ private:
IsExpression = true;
AnnotatedToken *Previous = Current.Parent;
while (Previous != NULL) {
- if (Previous->Type == TT_BinaryOperator)
+ if (Previous->Type == TT_BinaryOperator &&
+ (Previous->is(tok::star) || Previous->is(tok::amp))) {
Previous->Type = TT_PointerOrReference;
+ }
Previous = Previous->Parent;
}
}