No spaces around pointers to members.
Before: (a ->* f)()
After: (a->*f)()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176252 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Format/TokenAnnotator.cpp b/lib/Format/TokenAnnotator.cpp
index 6b91993..5c17223 100644
--- a/lib/Format/TokenAnnotator.cpp
+++ b/lib/Format/TokenAnnotator.cpp
@@ -1027,6 +1027,8 @@
if (Tok.Parent->is(tok::comma))
return true;
+ if (Tok.is(tok::comma))
+ return false;
if (Tok.Type == TT_CtorInitializerColon || Tok.Type == TT_ObjCBlockLParen)
return true;
if (Tok.Parent->FormatTok.Tok.is(tok::kw_operator))
@@ -1048,8 +1050,9 @@
Tok.Parent->Type == TT_TemplateCloser &&
Style.Standard != FormatStyle::LS_Cpp11;
}
- if (Tok.Type == TT_BinaryOperator ||
- (Tok.Parent->Type == TT_BinaryOperator && Tok.isNot(tok::comma)))
+ if (Tok.is(tok::arrowstar) || Tok.Parent->is(tok::arrowstar))
+ return false;
+ if (Tok.Type == TT_BinaryOperator || Tok.Parent->Type == TT_BinaryOperator)
return true;
if (Tok.Parent->Type == TT_TemplateCloser && Tok.is(tok::l_paren))
return false;