summaryrefslogtreecommitdiffstats
path: root/test/CXX/basic/basic.start/basic.start.main
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/basic/basic.start/basic.start.main')
-rw-r--r--test/CXX/basic/basic.start/basic.start.main/p2.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CXX/basic/basic.start/basic.start.main/p2.cpp b/test/CXX/basic/basic.start/basic.start.main/p2.cpp
index a5386f1..5c7d60c 100644
--- a/test/CXX/basic/basic.start/basic.start.main/p2.cpp
+++ b/test/CXX/basic/basic.start/basic.start.main/p2.cpp
@@ -15,6 +15,8 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s -DTEST10
// RUN: %clang_cc1 -fsyntax-only -verify %s -DTEST11
// RUN: %clang_cc1 -fsyntax-only -verify %s -DTEST12
+// RUN: %clang_cc1 -fsyntax-only -verify %s -DTEST13
+// RUN: %clang_cc1 -fsyntax-only -verify %s -DTEST14
#if TEST1
@@ -94,6 +96,20 @@ int main(int, charT* const *) {}
typedef char charT;
int main(int, const charT* const *) {}
+#elif TEST13
+
+int main(void) {}
+
+template <typename T>
+int main(void); // expected-error{{'main' cannot be a template}}
+
+#elif TEST14
+
+template <typename T>
+int main(void); // expected-error{{'main' cannot be a template}}
+
+int main(void) {}
+
#else
#error Unknown test mode
OpenPOWER on IntegriCloud