const PointerType* PT;
if ((PT = qs.strip(AT)->getAs<PointerType>()) &&
(PT = qs.strip(PT->getPointeeType())->getAs<PointerType>()) &&
- (QualType(qs.strip(PT->getPointeeType()), 0) == Context.CharTy)) {
+ Context.hasSameType(QualType(qs.strip(PT->getPointeeType()), 0),
+ Context.CharTy)) {
qs.removeConst();
mismatch = !qs.empty();
}
// RUN: not %clang_cc1 -x c++ %t -std=c++11 -fixit -DTEST9
// RUN: %clang_cc1 -x c++ %t -std=c++11 -fsyntax-only -DTEST9
+// RUN: %clang_cc1 -fsyntax-only -verify %s -DTEST10
+// RUN: %clang_cc1 -fsyntax-only -verify %s -DTEST11
+// RUN: %clang_cc1 -fsyntax-only -verify %s -DTEST12
+
#if TEST1
// expected-no-diagnostics
constexpr int main() { } // expected-error{{'main' is not allowed to be declared constexpr}}
+#elif TEST10
+
+// PR15100
+// expected-no-diagnostics
+typedef char charT;
+int main(int, const charT**) {}
+
+#elif TEST11
+
+// expected-no-diagnostics
+typedef char charT;
+int main(int, charT* const *) {}
+
+#elif TEST12
+
+// expected-no-diagnostics
+typedef char charT;
+int main(int, const charT* const *) {}
+
#else
#error Unknown test mode