File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1084,6 +1084,16 @@ namespace {
10841084
10851085 printFlag (D->isImplicit (), " implicit" , DeclModifierColor);
10861086 printFlag (D->isHoisted (), " hoisted" , DeclModifierColor);
1087+
1088+ if (auto implAttr = D->getAttrs ().getAttribute <ObjCImplementationAttr>()) {
1089+ StringRef label =
1090+ implAttr->isEarlyAdopter () ? " objc_impl" : " clang_impl" ;
1091+ if (implAttr->CategoryName .empty ())
1092+ printFlag (label);
1093+ else
1094+ printFieldQuoted (implAttr->CategoryName .str (), label);
1095+ }
1096+
10871097 printSourceRange (D->getSourceRange (), &D->getASTContext ());
10881098 printFlag (D->TrailingSemiLoc .isValid (), " trailing_semi" ,
10891099 DeclModifierColor);
Original file line number Diff line number Diff line change @@ -1066,6 +1066,11 @@ extension ASTGenVisitor {
10661066 return nil
10671067 }
10681068
1069+ if case . token( let tok) = arguments {
1070+ // Special case: was parsed as a token, not an an argument list
1071+ return valueGeneratorFunction ( tok)
1072+ }
1073+
10691074 guard var arguments = arguments. as ( LabeledExprListSyntax . self) ? [ ... ] else {
10701075 // TODO: Diagnose.
10711076 return nil
Original file line number Diff line number Diff line change @@ -57,3 +57,8 @@ func testMutating(value: S3) {
5757class C1 { }
5858@_alignment ( 7 ) // expected-error {{alignment value must be a power of two}}
5959struct S4 { }
60+
61+ @implementation extension ObjCClass1 { } // expected-error {{cannot find type 'ObjCClass1' in scope}}
62+ @implementation ( Category) extension ObjCClass1 { } // expected-error {{cannot find type 'ObjCClass1' in scope}}
63+ @_objcImplementation extension ObjCClass2 { } // expected-error {{cannot find type 'ObjCClass2' in scope}}
64+ @_objcImplementation ( Category) extension ObjCClass2 { } // expected-error {{cannot find type 'ObjCClass2' in scope}}
You can’t perform that action at this time.
0 commit comments