diff options
author | Nico Weber <nicolasweber@gmx.de> | 2013-01-07 19:05:19 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2013-01-07 19:05:19 +0000 |
commit | 6092d4ed09a2368871993d9a45717f24394329ce (patch) | |
tree | 2c711fa6618bce45d718fb4ad47c9a61d201d651 /lib/Format/UnwrappedLineParser.cpp | |
parent | 27c2cb24d5e2e9fda68b929c6d03c761196d8e2d (diff) |
Formatter: Support @public/@protected/@package/@private.
@package is an Objective-C 2 feature, so turn on ObjC2 as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171766 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/UnwrappedLineParser.cpp')
-rw-r--r-- | lib/Format/UnwrappedLineParser.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp index d7220259b7..adb536324a 100644 --- a/lib/Format/UnwrappedLineParser.cpp +++ b/lib/Format/UnwrappedLineParser.cpp @@ -198,6 +198,18 @@ void UnwrappedLineParser::parseStructuralElement() { int TokenNumber = 0; switch (FormatTok.Tok.getKind()) { + case tok::at: + nextToken(); + switch (FormatTok.Tok.getObjCKeywordID()) { + case tok::objc_public: + case tok::objc_protected: + case tok::objc_package: + case tok::objc_private: + return parseAccessSpecifier(); + default: + break; + } + break; case tok::kw_namespace: parseNamespace(); return; |