[cfe-commits] r155755 - in /cfe/trunk: lib/Sema/SemaExprCXX.cpp test/SemaCXX/type-traits.cpp

Benjamin Kramer benny.kra at googlemail.com
Sat Apr 28 03:00:33 PDT 2012


Author: d0k
Date: Sat Apr 28 05:00:33 2012
New Revision: 155755

URL: http://llvm.org/viewvc/llvm-project?rev=155755&view=rev
Log:
Revert "Use the C++11 definition of PODness for __is_pod in C++11 mode."

This is just papering over a major bug in isPODType, real fix coming up soon.

Modified:
    cfe/trunk/lib/Sema/SemaExprCXX.cpp
    cfe/trunk/test/SemaCXX/type-traits.cpp

Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=155755&r1=155754&r2=155755&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Sat Apr 28 05:00:33 2012
@@ -3010,8 +3010,7 @@
   case UTT_IsStandardLayout:
     return T->isStandardLayoutType();
   case UTT_IsPOD:
-    return Self.LangOpts.CPlusPlus0x ? T.isCXX11PODType(Self.Context)
-                                     : T.isPODType(Self.Context);
+    return T.isPODType(Self.Context);
   case UTT_IsLiteral:
     return T->isLiteralType();
   case UTT_IsEmpty:

Modified: cfe/trunk/test/SemaCXX/type-traits.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/type-traits.cpp?rev=155755&r1=155754&r2=155755&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/type-traits.cpp (original)
+++ cfe/trunk/test/SemaCXX/type-traits.cpp Sat Apr 28 05:00:33 2012
@@ -131,25 +131,25 @@
   { int arr[T(__is_pod(HasAnonymousUnion))]; }
   { int arr[T(__is_pod(Vector))]; }
   { int arr[T(__is_pod(VectorExt))]; }
-  { int arr[T(__is_pod(Derives))]; }
-  { int arr[T(__is_pod(DerivesAr))]; }
-  { int arr[T(__is_pod(DerivesArNB))]; }
-  { int arr[T(__is_pod(DerivesEmpty))]; }
-  { int arr[T(__is_pod(HasPriv))]; }
-  { int arr[T(__is_pod(HasProt))]; }
-  { int arr[T(__is_pod(DerivesHasPriv))]; }
-  { int arr[T(__is_pod(DerivesHasProt))]; }
 
+  { int arr[F(__is_pod(Derives))]; }
+  { int arr[F(__is_pod(DerivesAr))]; }
+  { int arr[F(__is_pod(DerivesArNB))]; }
+  { int arr[F(__is_pod(DerivesEmpty))]; }
   { int arr[F(__is_pod(HasCons))]; }
   { int arr[F(__is_pod(HasCopyAssign))]; }
   { int arr[F(__is_pod(HasMoveAssign))]; }
   { int arr[F(__is_pod(HasDest))]; }
+  { int arr[F(__is_pod(HasPriv))]; }
+  { int arr[F(__is_pod(HasProt))]; }
   { int arr[F(__is_pod(HasRef))]; }
   { int arr[F(__is_pod(HasVirt))]; }
   { int arr[F(__is_pod(DerivesHasCons))]; }
   { int arr[F(__is_pod(DerivesHasCopyAssign))]; }
   { int arr[F(__is_pod(DerivesHasMoveAssign))]; }
   { int arr[F(__is_pod(DerivesHasDest))]; }
+  { int arr[F(__is_pod(DerivesHasPriv))]; }
+  { int arr[F(__is_pod(DerivesHasProt))]; }
   { int arr[F(__is_pod(DerivesHasRef))]; }
   { int arr[F(__is_pod(DerivesHasVirt))]; }
   { int arr[F(__is_pod(NonPOD))]; }





More information about the cfe-commits mailing list