diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-04-28 10:00:33 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-04-28 10:00:33 +0000 |
| commit | a3c0dadb35e6ccd3df62b7fe8ccb927183e1f18c (patch) | |
| tree | 44e2e2af67535c191b665dec62fed8eb2bfbfbf4 | |
| parent | d0512d377fdb53cb3a37bf7129a560701df5dc2f (diff) | |
| download | bcm5719-llvm-a3c0dadb35e6ccd3df62b7fe8ccb927183e1f18c.tar.gz bcm5719-llvm-a3c0dadb35e6ccd3df62b7fe8ccb927183e1f18c.zip | |
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.
llvm-svn: 155755
| -rw-r--r-- | clang/lib/Sema/SemaExprCXX.cpp | 3 | ||||
| -rw-r--r-- | clang/test/SemaCXX/type-traits.cpp | 16 |
2 files changed, 9 insertions, 10 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index 7c8cabadb2d..7d345073d79 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -3010,8 +3010,7 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, UnaryTypeTrait UTT, 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: diff --git a/clang/test/SemaCXX/type-traits.cpp b/clang/test/SemaCXX/type-traits.cpp index 594d7dd03b2..f53939ac179 100644 --- a/clang/test/SemaCXX/type-traits.cpp +++ b/clang/test/SemaCXX/type-traits.cpp @@ -131,25 +131,25 @@ void is_pod() { 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))]; } |

