From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/CXX/basic/basic.start/basic.start.main/p2a.cpp | 8 ++++++++ clang/test/CXX/basic/basic.start/basic.start.main/p2b.cpp | 8 ++++++++ clang/test/CXX/basic/basic.start/basic.start.main/p2c.cpp | 4 ++++ clang/test/CXX/basic/basic.start/basic.start.main/p2d.cpp | 4 ++++ clang/test/CXX/basic/basic.start/basic.start.main/p2e.cpp | 4 ++++ clang/test/CXX/basic/basic.start/basic.start.main/p2f.cpp | 7 +++++++ clang/test/CXX/basic/basic.start/basic.start.main/p2g.cpp | 4 ++++ clang/test/CXX/basic/basic.start/basic.start.main/p2h.cpp | 5 +++++ clang/test/CXX/basic/basic.start/basic.start.main/p2i.cpp | 6 ++++++ 9 files changed, 50 insertions(+) create mode 100644 clang/test/CXX/basic/basic.start/basic.start.main/p2a.cpp create mode 100644 clang/test/CXX/basic/basic.start/basic.start.main/p2b.cpp create mode 100644 clang/test/CXX/basic/basic.start/basic.start.main/p2c.cpp create mode 100644 clang/test/CXX/basic/basic.start/basic.start.main/p2d.cpp create mode 100644 clang/test/CXX/basic/basic.start/basic.start.main/p2e.cpp create mode 100644 clang/test/CXX/basic/basic.start/basic.start.main/p2f.cpp create mode 100644 clang/test/CXX/basic/basic.start/basic.start.main/p2g.cpp create mode 100644 clang/test/CXX/basic/basic.start/basic.start.main/p2h.cpp create mode 100644 clang/test/CXX/basic/basic.start/basic.start.main/p2i.cpp (limited to 'clang/test/CXX/basic/basic.start') diff --git a/clang/test/CXX/basic/basic.start/basic.start.main/p2a.cpp b/clang/test/CXX/basic/basic.start/basic.start.main/p2a.cpp new file mode 100644 index 0000000..b8dfbe7 --- /dev/null +++ b/clang/test/CXX/basic/basic.start/basic.start.main/p2a.cpp @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +typedef int Int; +typedef char Char; +typedef Char* Carp; + +Int main(Int argc, Carp argv[]) { +} diff --git a/clang/test/CXX/basic/basic.start/basic.start.main/p2b.cpp b/clang/test/CXX/basic/basic.start/basic.start.main/p2b.cpp new file mode 100644 index 0000000..785382c --- /dev/null +++ b/clang/test/CXX/basic/basic.start/basic.start.main/p2b.cpp @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +typedef int Int; +typedef char Char; +typedef Char* Carp; + +Int main(Int argc, Carp argv[], Char *env[]) { +} diff --git a/clang/test/CXX/basic/basic.start/basic.start.main/p2c.cpp b/clang/test/CXX/basic/basic.start/basic.start.main/p2c.cpp new file mode 100644 index 0000000..81b08b9 --- /dev/null +++ b/clang/test/CXX/basic/basic.start/basic.start.main/p2c.cpp @@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +int main() { +} diff --git a/clang/test/CXX/basic/basic.start/basic.start.main/p2d.cpp b/clang/test/CXX/basic/basic.start/basic.start.main/p2d.cpp new file mode 100644 index 0000000..bcdbdb2 --- /dev/null +++ b/clang/test/CXX/basic/basic.start/basic.start.main/p2d.cpp @@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +static int main() { // expected-error {{'main' is not allowed to be declared static}} +} diff --git a/clang/test/CXX/basic/basic.start/basic.start.main/p2e.cpp b/clang/test/CXX/basic/basic.start/basic.start.main/p2e.cpp new file mode 100644 index 0000000..954fdbd --- /dev/null +++ b/clang/test/CXX/basic/basic.start/basic.start.main/p2e.cpp @@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +inline int main() { // expected-error {{'main' is not allowed to be declared inline}} +} diff --git a/clang/test/CXX/basic/basic.start/basic.start.main/p2f.cpp b/clang/test/CXX/basic/basic.start/basic.start.main/p2f.cpp new file mode 100644 index 0000000..ea5a752 --- /dev/null +++ b/clang/test/CXX/basic/basic.start/basic.start.main/p2f.cpp @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +void // expected-error {{'main' must return 'int'}} +main( // expected-error {{first parameter of 'main' (argument count) must be of type 'int'}} + float a +) { +} diff --git a/clang/test/CXX/basic/basic.start/basic.start.main/p2g.cpp b/clang/test/CXX/basic/basic.start/basic.start.main/p2g.cpp new file mode 100644 index 0000000..e3209fd --- /dev/null +++ b/clang/test/CXX/basic/basic.start/basic.start.main/p2g.cpp @@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +int main(int argc, const char* const* argv) { +} diff --git a/clang/test/CXX/basic/basic.start/basic.start.main/p2h.cpp b/clang/test/CXX/basic/basic.start/basic.start.main/p2h.cpp new file mode 100644 index 0000000..abf8faa --- /dev/null +++ b/clang/test/CXX/basic/basic.start/basic.start.main/p2h.cpp @@ -0,0 +1,5 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +template +int main() { } // expected-error{{'main' cannot be a template}} + diff --git a/clang/test/CXX/basic/basic.start/basic.start.main/p2i.cpp b/clang/test/CXX/basic/basic.start/basic.start.main/p2i.cpp new file mode 100644 index 0000000..db8da3c --- /dev/null +++ b/clang/test/CXX/basic/basic.start/basic.start.main/p2i.cpp @@ -0,0 +1,6 @@ +// RUN: cp %s %t +// RUN: %clang_cc1 -x c++ %s -std=c++11 -fsyntax-only -verify +// RUN: not %clang_cc1 -x c++ %t -std=c++11 -fixit +// RUN: %clang_cc1 -x c++ %t -std=c++11 -fsyntax-only + +constexpr int main() { } // expected-error{{'main' is not allowed to be declared constexpr}} -- cgit v1.2.3