summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/UnwrappedLineParser.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2013-01-07 19:05:19 +0000
committerNico Weber <nicolasweber@gmx.de>2013-01-07 19:05:19 +0000
commit04e9f1ab420486664622e5b1a71b8b7cfba20327 (patch)
tree1f727403f0d474770c57737ff010ec48bb15214e /clang/lib/Format/UnwrappedLineParser.cpp
parente8f1eaea8ac513530fd7ce4c2f0d46cc77f9e540 (diff)
downloadbcm5719-llvm-04e9f1ab420486664622e5b1a71b8b7cfba20327.tar.gz
bcm5719-llvm-04e9f1ab420486664622e5b1a71b8b7cfba20327.zip
Formatter: Support @public/@protected/@package/@private.
@package is an Objective-C 2 feature, so turn on ObjC2 as well. llvm-svn: 171766
Diffstat (limited to 'clang/lib/Format/UnwrappedLineParser.cpp')
-rw-r--r--clang/lib/Format/UnwrappedLineParser.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp
index d7220259b7e..adb536324a3 100644
--- a/clang/lib/Format/UnwrappedLineParser.cpp
+++ b/clang/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;
OpenPOWER on IntegriCloud