[cfe-commits] r163236 - in /cfe/trunk: lib/AST/Type.cpp test/SemaObjCXX/arc-0x.mm
Fariborz Jahanian
fjahanian at apple.com
Wed Sep 5 12:51:21 PDT 2012
Author: fjahanian
Date: Wed Sep 5 14:51:20 2012
New Revision: 163236
URL: http://llvm.org/viewvc/llvm-project?rev=163236&view=rev
Log:
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
Modified:
cfe/trunk/lib/AST/Type.cpp
cfe/trunk/test/SemaObjCXX/arc-0x.mm
Modified: cfe/trunk/lib/AST/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Type.cpp?rev=163236&r1=163235&r2=163236&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Type.cpp (original)
+++ cfe/trunk/lib/AST/Type.cpp Wed Sep 5 14:51:20 2012
@@ -1211,8 +1211,6 @@
return false;
case Qualifiers::OCL_None:
- if (ty->isObjCLifetimeType())
- return false;
break;
}
}
Modified: cfe/trunk/test/SemaObjCXX/arc-0x.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjCXX/arc-0x.mm?rev=163236&r1=163235&r2=163236&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjCXX/arc-0x.mm (original)
+++ cfe/trunk/test/SemaObjCXX/arc-0x.mm Wed Sep 5 14:51:20 2012
@@ -80,4 +80,16 @@
autoTemplateFunction<id, 2>(obj, obj, [Array new]); // no-warning
}
+// rdar://12229679
+ at interface NSObject @end
+typedef __builtin_va_list va_list;
+ at interface MyClass : NSObject
+ at end
+ at implementation MyClass
++ (void)fooMethod:(id)firstArg, ... {
+ va_list args;
+
+ __builtin_va_arg(args, id);
+}
+ at end
More information about the cfe-commits
mailing list