summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/TreeTransform.h
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2013-12-13 20:49:58 +0000
committerAlp Toker <alp@nuanti.com>2013-12-13 20:49:58 +0000
commitcbb9034e2a04f116bfd8cd62f69ef717afa10933 (patch)
tree64b8bbe479d4621042e921d9db0327e085cc6b7b /clang/lib/Sema/TreeTransform.h
parentf6d58ff5c46cdaeda4a43039eeacdcfa94bb8f51 (diff)
downloadbcm5719-llvm-cbb9034e2a04f116bfd8cd62f69ef717afa10933.tar.gz
bcm5719-llvm-cbb9034e2a04f116bfd8cd62f69ef717afa10933.zip
Eliminate BinaryTypeTraitExpr
There's nothing special about type traits accepting two arguments. This commit eliminates BinaryTypeTraitExpr and switches all related handling over to TypeTraitExpr. Also fixes a CodeGen failure with variadic type traits appearing in a non-constant expression. The BTT/TT prefix and evaluation code is retained as-is for now but will soon be further cleaned up. This is part of the ongoing work to unify type traits. llvm-svn: 197273
Diffstat (limited to 'clang/lib/Sema/TreeTransform.h')
-rw-r--r--clang/lib/Sema/TreeTransform.h33
1 files changed, 0 insertions, 33 deletions
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index 463020a694d..8c7838e6a7b 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -2146,18 +2146,6 @@ public:
return getSema().BuildUnaryTypeTrait(Trait, StartLoc, T, RParenLoc);
}
- /// \brief Build a new binary type trait expression.
- ///
- /// By default, performs semantic analysis to build the new expression.
- /// Subclasses may override this routine to provide different behavior.
- ExprResult RebuildBinaryTypeTrait(BinaryTypeTrait Trait,
- SourceLocation StartLoc,
- TypeSourceInfo *LhsT,
- TypeSourceInfo *RhsT,
- SourceLocation RParenLoc) {
- return getSema().BuildBinaryTypeTrait(Trait, StartLoc, LhsT, RhsT, RParenLoc);
- }
-
/// \brief Build a new type trait expression.
///
/// By default, performs semantic analysis to build the new expression.
@@ -7895,27 +7883,6 @@ TreeTransform<Derived>::TransformUnaryTypeTraitExpr(UnaryTypeTraitExpr *E) {
template<typename Derived>
ExprResult
-TreeTransform<Derived>::TransformBinaryTypeTraitExpr(BinaryTypeTraitExpr *E) {
- TypeSourceInfo *LhsT = getDerived().TransformType(E->getLhsTypeSourceInfo());
- if (!LhsT)
- return ExprError();
-
- TypeSourceInfo *RhsT = getDerived().TransformType(E->getRhsTypeSourceInfo());
- if (!RhsT)
- return ExprError();
-
- if (!getDerived().AlwaysRebuild() &&
- LhsT == E->getLhsTypeSourceInfo() && RhsT == E->getRhsTypeSourceInfo())
- return SemaRef.Owned(E);
-
- return getDerived().RebuildBinaryTypeTrait(E->getTrait(),
- E->getLocStart(),
- LhsT, RhsT,
- E->getLocEnd());
-}
-
-template<typename Derived>
-ExprResult
TreeTransform<Derived>::TransformTypeTraitExpr(TypeTraitExpr *E) {
bool ArgChanged = false;
SmallVector<TypeSourceInfo *, 4> Args;
OpenPOWER on IntegriCloud