a method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46232
91177308-0d34-0410-b5e6-
96231b3b80d8
PI.Ident = PDecl->getIdentifier();
PI.IdentLoc = PDecl->getLocation(); // user vars have a real location.
PI.TypeInfo = PDecl->getType().getAsOpaquePtr();
- ActOnParamDeclarator(PI, FnBodyScope);
+ MDecl->setParamDecl(i, ActOnParamDeclarator(PI, FnBodyScope));
}
}
assert(i < getNumParams() && "Illegal param #");
return ParamInfo[i];
}
+ void setParamDecl(int i, ParmVarDecl *pDecl) {
+ ParamInfo[i] = pDecl;
+ }
void setMethodParams(ParmVarDecl **NewParamInfo, unsigned NumParams);
AttributeList *getMethodAttrs() const {return MethodAttrs;}
--- /dev/null
+// RUN: clang -fsyntax-only -verify %s
+
+#include <stdarg.h>
+
+@interface NSObject @end
+@interface XX : NSObject @end
+
+@implementation XX
+- (void)encodeValuesOfObjCTypes:(const char *)types, ... {
+ va_list ap;
+ va_start(ap, types);
+ while (*types) ;
+ va_end(ap);
+}
+
+@end
+
@implementation XX
- (void)encodeValuesOfObjCTypes:(const char *)types, ... {
va_list ap;
- va_start(ap, types); // expected-warning {{second parameter of 'va_start' not last named argument}}
+ va_start(ap, types);
while (*types) ;
va_end(ap);
}