[cfe-commits] r130074 - /cfe/trunk/test/SemaCXX/type-traits.cpp

Chandler Carruth chandlerc at gmail.com
Sat Apr 23 13:51:42 PDT 2011


Author: chandlerc
Date: Sat Apr 23 15:51:42 2011
New Revision: 130074

URL: http://llvm.org/viewvc/llvm-project?rev=130074&view=rev
Log:
Test POD and trivial type traits given a class derived from a generic
non-POD type.

It might be nicer to have a Derives* variant for each of HasCons,
HasCopy, etc. Then we could test each of those and also test the __has_*
traits. WIP.

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

Modified: cfe/trunk/test/SemaCXX/type-traits.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/type-traits.cpp?rev=130074&r1=130073&r2=130074&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/type-traits.cpp (original)
+++ cfe/trunk/test/SemaCXX/type-traits.cpp Sat Apr 23 15:51:42 2011
@@ -33,6 +33,7 @@
 typedef Derives DerivesAr[10];
 typedef Derives DerivesArNB[];
 struct DerivesEmpty : Empty {};
+struct DerivesNonPOD : NonPOD {};
 struct HasCons { HasCons(int); };
 struct HasCopyAssign { HasCopyAssign operator =(const HasCopyAssign&); };
 struct HasDest { ~HasDest(); };
@@ -99,6 +100,7 @@
   { int arr[F(__is_pod(DerivesAr))]; }
   { int arr[F(__is_pod(DerivesArNB))]; }
   { int arr[F(__is_pod(DerivesEmpty))]; }
+  { int arr[F(__is_pod(DerivesNonPOD))]; }
   { int arr[F(__is_pod(HasCons))]; }
   { int arr[F(__is_pod(HasCopyAssign))]; }
   { int arr[F(__is_pod(HasDest))]; }
@@ -589,6 +591,7 @@
   { int arr[F(__is_trivial(HasVirt))]; }
   { int arr[F(__is_trivial(IntArNB))]; }
   { int arr[F(__is_trivial(DerivesArNB))]; }
+  { int arr[F(__is_trivial(DerivesNonPOD))]; }
   { int arr[F(__is_trivial(void))]; }
   { int arr[F(__is_trivial(cvoid))]; }
 }





More information about the cfe-commits mailing list