summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-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 ca8d595df76..1a55985905c 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -519,7 +519,7 @@ private:
if (getPrecedence(Current) == prec::Assignment) {
Contexts.back().IsExpression = true;
AnnotatedToken *Previous = Current.Parent;
- while (Previous != NULL) {
+ while (Previous != NULL && Previous->isNot(tok::comma)) {
if (Previous->Type == TT_BinaryOperator &&
(Previous->is(tok::star) || Previous->is(tok::amp))) {
Previous->Type = TT_PointerOrReference;
OpenPOWER on IntegriCloud