diff options
author | Nico Weber <nicolasweber@gmx.de> | 2018-01-23 17:10:25 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2018-01-23 17:10:25 +0000 |
commit | c068ff72c526c75f3ba87b7a5ef6d051a17e3c45 (patch) | |
tree | 0b18c18857bc044909648914e82f02778a689169 /clang/unittests/Format/FormatTestObjC.cpp | |
parent | f1d814d40c054f4603e1b7bbadbe188e38496c24 (diff) | |
download | bcm5719-llvm-c068ff72c526c75f3ba87b7a5ef6d051a17e3c45.tar.gz bcm5719-llvm-c068ff72c526c75f3ba87b7a5ef6d051a17e3c45.zip |
clang-format: Support macros in front of @interface / @protocol for ObjC code.
llvm-svn: 323226
Diffstat (limited to 'clang/unittests/Format/FormatTestObjC.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestObjC.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestObjC.cpp b/clang/unittests/Format/FormatTestObjC.cpp index 6cb5729e252..879932db0db 100644 --- a/clang/unittests/Format/FormatTestObjC.cpp +++ b/clang/unittests/Format/FormatTestObjC.cpp @@ -215,6 +215,12 @@ TEST_F(FormatTestObjC, FormatObjCInterface) { "@end"); verifyFormat("@interface Foo : Bar\n" + "@property(assign, readwrite) NSInteger bar;\n" + "+ (id)init;\n" + "@end"); + + verifyFormat("FOUNDATION_EXPORT NS_AVAILABLE_IOS(10.0) @interface Foo : Bar\n" + "@property(assign, readwrite) NSInteger bar;\n" "+ (id)init;\n" "@end"); @@ -394,6 +400,10 @@ TEST_F(FormatTestObjC, FormatObjCProtocol) { "@protocol Bar\n" "@end"); + verifyFormat("FOUNDATION_EXPORT NS_AVAILABLE_IOS(10.0) @protocol Foo\n" + "@property(assign, readwrite) NSInteger bar;\n" + "@end"); + verifyFormat("@protocol myProtocol\n" "- (void)mandatoryWithInt:(int)i;\n" "@optional\n" |