summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorRoger Ferrer Ibanez <roger.ferreribanez@arm.com>2017-02-24 08:41:09 +0000
committerRoger Ferrer Ibanez <roger.ferreribanez@arm.com>2017-02-24 08:41:09 +0000
commitd93add34b752b1b18a100f785e72f1f38f6479a6 (patch)
tree5966c6fc1d6277fd9953e669f748013ae0d88032 /clang/lib/AST/ASTContext.cpp
parent83143a8e3e450e719d7ab62fa475723cf6120d1c (diff)
downloadbcm5719-llvm-d93add34b752b1b18a100f785e72f1f38f6479a6.tar.gz
bcm5719-llvm-d93add34b752b1b18a100f785e72f1f38f6479a6.zip
Fix crash when an incorrect redeclaration only differs in __unaligned type-qualifier
Fix an assertion that is hit when a redeclaration with differing types only differs in the unaligned type-qualifier. Differential Revision: https://reviews.llvm.org/D29986 llvm-svn: 296099
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 103c7e191cc..922d74e487a 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -8077,7 +8077,8 @@ QualType ASTContext::mergeTypes(QualType LHS, QualType RHS,
// mismatch.
if (LQuals.getCVRQualifiers() != RQuals.getCVRQualifiers() ||
LQuals.getAddressSpace() != RQuals.getAddressSpace() ||
- LQuals.getObjCLifetime() != RQuals.getObjCLifetime())
+ LQuals.getObjCLifetime() != RQuals.getObjCLifetime() ||
+ LQuals.hasUnaligned() != RQuals.hasUnaligned())
return QualType();
// Exactly one GC qualifier difference is allowed: __strong is
OpenPOWER on IntegriCloud