summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/basic/basic.start
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-01-29 02:49:47 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-01-29 02:49:47 +0000
commit685cef649956948eabca83c3483c8e4e8f990550 (patch)
treeb3112ed2a07cdfb3cd4a8a062c4212c7e2eccd3a /clang/test/CXX/basic/basic.start
parent59de94bd4e1c5af38a2694614be6df9c19d21248 (diff)
downloadbcm5719-llvm-685cef649956948eabca83c3483c8e4e8f990550.tar.gz
bcm5719-llvm-685cef649956948eabca83c3483c8e4e8f990550.zip
PR15100: look through type sugar when determining whether we have one of the
forms of 'main' which we accept as an extension. llvm-svn: 173758
Diffstat (limited to 'clang/test/CXX/basic/basic.start')
-rw-r--r--clang/test/CXX/basic/basic.start/basic.start.main/p2.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/clang/test/CXX/basic/basic.start/basic.start.main/p2.cpp b/clang/test/CXX/basic/basic.start/basic.start.main/p2.cpp
index 38536e646f2..a5386f1b925 100644
--- a/clang/test/CXX/basic/basic.start/basic.start.main/p2.cpp
+++ b/clang/test/CXX/basic/basic.start/basic.start.main/p2.cpp
@@ -12,6 +12,10 @@
// 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
@@ -71,6 +75,25 @@ int main() { } // expected-error{{'main' cannot be a template}}
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
OpenPOWER on IntegriCloud