summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-11-11 22:15:25 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-11-11 22:15:25 +0000
commit8b827be6da80844e89febb5be0cbc681eaef8ade (patch)
treef955669cc9d8b9e7c268d7cfc11712aab88da61c
parent033149c1c66655b5ad6ff0f0b570fd9594f866b8 (diff)
downloadsrc-test2-8b827be6da80844e89febb5be0cbc681eaef8ade.tar.gz
src-test2-8b827be6da80844e89febb5be0cbc681eaef8ade.zip
MFC r366683:
Merge commit 35ecc7fe4 from llvm git (by Hubert Tong): [clang][Sema] Fix PR47676: Handle dependent AltiVec C-style cast Fix premature decision in the presence of type-dependent expression operands on whether AltiVec vector initializations from single expressions are "splat" operations. Verify that the instantiation is able to determine the correct cast semantics for both the scalar type and the vector type case. Note that, because the change only affects the single-expression case (and the target type is an AltiVec-style vector type), the replacement of a parenthesized list with a parenthesized expression does not change the semantics of the program in a program-observable manner. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D88526 This should fix 'Assertion failed: (isScalarType()), function getScalarTypeKind, file /usr/src/contrib/llvm-project/clang/lib/AST /Type.cpp, line 2146', when building the graphics/opencv-core port for powerpc64le. Requested by: pkubaj
Notes
Notes: svn path=/stable/11/; revision=367602
-rw-r--r--contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp
index 04a7038d6754..8e97bb4052f7 100644
--- a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp
+++ b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp
@@ -6809,7 +6809,7 @@ Sema::ActOnCastExpr(Scope *S, SourceLocation LParenLoc,
}
if (PE || PLE->getNumExprs() == 1) {
Expr *E = (PE ? PE->getSubExpr() : PLE->getExpr(0));
- if (!E->getType()->isVectorType())
+ if (!E->isTypeDependent() && !E->getType()->isVectorType())
isVectorLiteral = true;
}
else