summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/TokenAnnotator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
-rw-r--r--clang/lib/Format/TokenAnnotator.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp
index 7e3ef75d3dc..25670d4f688 100644
--- a/clang/lib/Format/TokenAnnotator.cpp
+++ b/clang/lib/Format/TokenAnnotator.cpp
@@ -313,11 +313,7 @@ private:
switch (Tok->FormatTok.Tok.getKind()) {
case tok::plus:
case tok::minus:
- // At the start of the line, +/- specify ObjectiveC method declarations.
- if (Tok->Children.empty() || Tok->Children[0].Children.empty())
- break; // Can't be an ObjectiveC method declaration.
- if (Tok->Parent == NULL && (Tok->Children[0].is(tok::l_paren) ||
- Tok->Children[0].Children[0].is(tok::colon)))
+ if (Tok->Parent == NULL && Line.MustBeDeclaration)
Tok->Type = TT_ObjCMethodSpecifier;
break;
case tok::colon:
OpenPOWER on IntegriCloud