summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2017-10-24 21:31:50 +0000
committerErich Keane <erich.keane@intel.com>2017-10-24 21:31:50 +0000
commite63e9d72b828bc9c919ef03bf063cbb357e6063f (patch)
treedf7e377c9f494fd8ae3896f1900b8ef2e80d16dd /clang/lib/Sema/SemaExprCXX.cpp
parentc70b392e49ea5f23854f3123cbd0c075bf3498cf (diff)
downloadbcm5719-llvm-e63e9d72b828bc9c919ef03bf063cbb357e6063f.tar.gz
bcm5719-llvm-e63e9d72b828bc9c919ef03bf063cbb357e6063f.zip
mplement __has_unique_object_representations
A helper builtin to facilitate implementing the std::has_unique_object_representations type trait. Requested here: https://bugs.llvm.org/show_bug.cgi?id=34942 Also already exists in GCC and MSVC. Differential Revision: https://reviews.llvm.org/D39064 llvm-svn: 316518
Diffstat (limited to 'clang/lib/Sema/SemaExprCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaExprCXX.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index 7f5b792e8c4..1ed714f8c86 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -4175,6 +4175,7 @@ static bool CheckUnaryTypeTraitTypeCompleteness(Sema &S, TypeTrait UTT,
case UTT_IsDestructible:
case UTT_IsNothrowDestructible:
case UTT_IsTriviallyDestructible:
+ case UTT_HasUniqueObjectRepresentations:
if (ArgTy->isIncompleteArrayType() || ArgTy->isVoidType())
return true;
@@ -4614,6 +4615,8 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT,
// Returns True if and only if T is a complete type at the point of the
// function call.
return !T->isIncompleteType();
+ case UTT_HasUniqueObjectRepresentations:
+ return T.hasUniqueObjectRepresentations(C);
}
}
OpenPOWER on IntegriCloud