Clang would assert when isObjCInstancetype() was called on a
tok::annot_cxxscope token.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271688
91177308-0d34-0410-b5e6-
96231b3b80d8
/// Should only be used in Objective-C language modes.
bool isObjCInstancetype() {
assert(getLangOpts().ObjC1);
+ if (Tok.isAnnotation())
+ return false;
if (!Ident_instancetype)
Ident_instancetype = PP.getIdentifierInfo("instancetype");
return Tok.getIdentifierInfo() == Ident_instancetype;
return 0;
}
@end
+
+// PR27822
+@class NSString;
+namespace pr27822 { }
+@interface AXPlatformNodeCocoa
++ (NSString*)nativeRoleFromAXRole:(pr27822::UndeclaredIdentifier)role; // expected-error {{expected a type}}
+@end