summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
authorYaxun Liu <Yaxun.Liu@amd.com>2016-04-28 17:34:57 +0000
committerYaxun Liu <Yaxun.Liu@amd.com>2016-04-28 17:34:57 +0000
commitab93394a29672c1f2daff7b920c203f8db6a5953 (patch)
treeca02780eefcdbeee9ee14160c24c8d73e845fbef /clang/lib/AST
parent08afb05491aa7dd63cf14ba76261dff0203ee686 (diff)
downloadbcm5719-llvm-ab93394a29672c1f2daff7b920c203f8db6a5953.tar.gz
bcm5719-llvm-ab93394a29672c1f2daff7b920c203f8db6a5953.zip
[OpenCL] Fix bug in mergeTypes which causes equivalent types treated as different.
When comparing unqualified types, canonical types should be used, otherwise equivalent types may be treated as different type. Differential Revision: http://reviews.llvm.org/D19662 llvm-svn: 267906
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/ASTContext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index fb4c80bd7fd..4f7f8ee8b8d 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -7618,7 +7618,7 @@ QualType ASTContext::mergeTypes(QualType LHS, QualType RHS,
Qualifiers RQuals = RHSCan.getLocalQualifiers();
if (LQuals != RQuals) {
if (getLangOpts().OpenCL) {
- if (LHS.getUnqualifiedType() != RHS.getUnqualifiedType() ||
+ if (LHSCan.getUnqualifiedType() != RHSCan.getUnqualifiedType() ||
LQuals.getCVRQualifiers() != RQuals.getCVRQualifiers())
return QualType();
if (LQuals.isAddressSpaceSupersetOf(RQuals))
OpenPOWER on IntegriCloud