summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateVariadic.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-03-04 21:27:21 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-03-04 21:27:21 +0000
commitacf07a0f1a4db91e47d9555167fed394bb434e19 (patch)
tree86fc8f39f3116cc8830ec7f44cb6085fe8111737 /lib/Sema/SemaTemplateVariadic.cpp
parente1626feb8253d291baf90c36f373a18870f7a62b (diff)
downloadclang-acf07a0f1a4db91e47d9555167fed394bb434e19.tar.gz
Implement P0036R0: remove support for empty unary folds of +, *, |, &.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262747 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateVariadic.cpp')
-rw-r--r--lib/Sema/SemaTemplateVariadic.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/Sema/SemaTemplateVariadic.cpp b/lib/Sema/SemaTemplateVariadic.cpp
index cb67d71f9e..c692c9f75c 100644
--- a/lib/Sema/SemaTemplateVariadic.cpp
+++ b/lib/Sema/SemaTemplateVariadic.cpp
@@ -996,10 +996,6 @@ ExprResult Sema::BuildEmptyCXXFoldExpr(SourceLocation EllipsisLoc,
BinaryOperatorKind Operator) {
// [temp.variadic]p9:
// If N is zero for a unary fold-expression, the value of the expression is
- // * -> 1
- // + -> int()
- // & -> -1
- // | -> int()
// && -> true
// || -> false
// , -> void()
@@ -1009,17 +1005,6 @@ ExprResult Sema::BuildEmptyCXXFoldExpr(SourceLocation EllipsisLoc,
// prevent the result from being a null pointer constant.
QualType ScalarType;
switch (Operator) {
- case BO_Add:
- ScalarType = Context.IntTy;
- break;
- case BO_Mul:
- return ActOnIntegerConstant(EllipsisLoc, 1);
- case BO_Or:
- ScalarType = Context.IntTy;
- break;
- case BO_And:
- return CreateBuiltinUnaryOp(EllipsisLoc, UO_Minus,
- ActOnIntegerConstant(EllipsisLoc, 1).get());
case BO_LOr:
return ActOnCXXBoolLiteral(EllipsisLoc, tok::kw_false);
case BO_LAnd: