Index: clang/lib/Format/TokenAnnotator.cpp =================================================================== --- clang/lib/Format/TokenAnnotator.cpp +++ clang/lib/Format/TokenAnnotator.cpp @@ -2173,8 +2173,8 @@ int CurrentPrecedence = getCurrentPrecedence(); - if (Current && Current->is(TT_SelectorName) && - Precedence == CurrentPrecedence) { + if (Precedence == CurrentPrecedence && Current && + Current->is(TT_SelectorName)) { if (LatestOperator) addFakeParenthesis(Start, prec::Level(Precedence)); Start = Current;