diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2012-09-05 19:51:20 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-09-05 19:51:20 +0000 |
commit | 255793d35bd5aa13ab2fd0b22f66b8e34698d8e0 (patch) | |
tree | a47f7f90aa857ae1be801ca9567174f2adb27980 | |
parent | fcf75a3d8c072eabbf25c9b33ccbb1b8bd042cfc (diff) |
objective-c++11: c++11 does not change pod-ness when
type is an unqualified objc pointer in arc. Treat it just
as being treated in c++98. This fixes a bogus vararg warning
with -std=c++11. //rdar://12229679
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163236 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/AST/Type.cpp | 2 | ||||
-rw-r--r-- | test/SemaObjCXX/arc-0x.mm | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index c54250a479..529c90603c 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -1211,8 +1211,6 @@ bool QualType::isCXX11PODType(ASTContext &Context) const { return false; case Qualifiers::OCL_None: - if (ty->isObjCLifetimeType()) - return false; break; } } diff --git a/test/SemaObjCXX/arc-0x.mm b/test/SemaObjCXX/arc-0x.mm index e24b9602fb..43f6671ac2 100644 --- a/test/SemaObjCXX/arc-0x.mm +++ b/test/SemaObjCXX/arc-0x.mm @@ -80,4 +80,16 @@ void testAutoIdTemplate(id obj) { autoTemplateFunction<id, 2>(obj, obj, [Array new]); // no-warning } +// rdar://12229679 +@interface NSObject @end +typedef __builtin_va_list va_list; +@interface MyClass : NSObject +@end + +@implementation MyClass ++ (void)fooMethod:(id)firstArg, ... { + va_list args; + __builtin_va_arg(args, id); +} +@end |