template <>
SourceLocation getArgLoc<ParmVarDecl>(ParmVarDecl *Arg) {
+ SourceLocation Loc = Arg->getLocStart();
+ if (Loc.isInvalid())
+ return Loc;
// -1 to point to left paren of the method parameter's type.
- return Arg->getLocStart().getLocWithOffset(-1);
+ return Loc.getLocWithOffset(-1);
}
template <typename T>
Class <SomeProtocol> UnfortunateGCCExtension;
+// rdar://10238337
+@protocol Broken @end
+@interface Crash @end
+@implementation Crash
+- (void)crashWith:(<Broken>)a { // expected-warning {{protocol qualifiers without 'id' is archaic}}
+}
+@end