diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-10-13 19:42:22 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-10-13 19:42:22 +0000 |
commit | f845673b2459f1daa76913333b0b24887a497f5d (patch) | |
tree | 22058ea2012b3d8f6b5718dd800ced4cb2706f71 /contrib/llvm-project | |
parent | 3f740d43932be7ec08f038b9b10e6325d0145563 (diff) | |
download | src-test-f845673b2459f1daa76913333b0b24887a497f5d.tar.gz src-test-f845673b2459f1daa76913333b0b24887a497f5d.zip |
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
MFC after: 4 weeks
X-MFC-With: r364284
Notes
Notes:
svn path=/head/; revision=366683
Diffstat (limited to 'contrib/llvm-project')
-rw-r--r-- | contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp | 2 |
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 3e235c85cc8b6..d301e6c732ab6 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaExpr.cpp @@ -7402,7 +7402,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 |