diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2019-11-22 12:26:54 -0800 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2019-11-22 12:57:24 -0800 |
commit | a6150b48cea00ab31e9335cc73770327acc4cb3a (patch) | |
tree | dda99570c3068879b3c35b0550d79e34f4515592 /clang/lib/Sema/SemaExpr.cpp | |
parent | 2b795637b9024d76e53cd303ad74ac02ba22da5b (diff) | |
download | bcm5719-llvm-a6150b48cea00ab31e9335cc73770327acc4cb3a.tar.gz bcm5719-llvm-a6150b48cea00ab31e9335cc73770327acc4cb3a.zip |
[Sema] Use the canonical type in function isVector
This fixes an assertion in Sema::CreateBuiltinBinOp that fails when one
of the vector operand's element type is a typedef of __fp16.
rdar://problem/55983556
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 3be8af1dd9e..63a189a102f 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -8155,7 +8155,7 @@ Sema::CheckAssignmentConstraints(SourceLocation Loc, /// type ElementType. static bool isVector(QualType QT, QualType ElementType) { if (const VectorType *VT = QT->getAs<VectorType>()) - return VT->getElementType() == ElementType; + return VT->getElementType().getCanonicalType() == ElementType; return false; } |