diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2016-08-16 21:17:51 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2016-08-16 21:17:51 +0000 |
| commit | e7145dcb9f6563389ebbfa0572ef7589bdd94b1b (patch) | |
| tree | b1b30c4998f6e9769784be87d402e4f8db13e34d /contrib/llvm/tools/clang/lib/Sema/SemaTemplateVariadic.cpp | |
| parent | 3ca95b020283db6244cab92ede73c969253b6a31 (diff) | |
| parent | 7fd6ba58d980ec2bf312a80444948501dd27d020 (diff) | |
Notes
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Sema/SemaTemplateVariadic.cpp')
| -rw-r--r-- | contrib/llvm/tools/clang/lib/Sema/SemaTemplateVariadic.cpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/contrib/llvm/tools/clang/lib/Sema/SemaTemplateVariadic.cpp b/contrib/llvm/tools/clang/lib/Sema/SemaTemplateVariadic.cpp index cb67d71f9e59..06afe87f515e 100644 --- a/contrib/llvm/tools/clang/lib/Sema/SemaTemplateVariadic.cpp +++ b/contrib/llvm/tools/clang/lib/Sema/SemaTemplateVariadic.cpp @@ -604,7 +604,7 @@ bool Sema::CheckParameterPacksForExpansion( // Template argument deduction can extend the sequence of template // arguments corresponding to a template parameter pack, even when the // sequence contains explicitly specified template arguments. - if (!IsFunctionParameterPack) { + if (!IsFunctionParameterPack && CurrentInstantiationScope) { if (NamedDecl *PartialPack = CurrentInstantiationScope->getPartiallySubstitutedPack()){ unsigned PartialDepth, PartialIndex; @@ -727,6 +727,7 @@ bool Sema::containsUnexpandedParameterPacks(Declarator &D) { case TST_half: case TST_float: case TST_double: + case TST_float128: case TST_bool: case TST_decimal32: case TST_decimal64: @@ -739,6 +740,8 @@ bool Sema::containsUnexpandedParameterPacks(Declarator &D) { case TST_auto: case TST_auto_type: case TST_decltype_auto: +#define GENERIC_IMAGE_TYPE(ImgType, Id) case TST_##ImgType##_t: +#include "clang/Basic/OpenCLImageTypes.def" case TST_unknown_anytype: case TST_error: break; @@ -996,10 +999,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 +1008,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: |
