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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@296099
91177308-0d34-0410-b5e6-
96231b3b80d8
// 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
--- /dev/null
+// RUN: %clang_cc1 %s -verify -fsyntax-only -fms-extensions
+
+int __unaligned * p1; // expected-note {{previous definition is here}}
+int * p1; // expected-error {{redefinition of 'p1' with a different type: 'int *' vs '__unaligned int *'}}