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/SemaTemplate/deduction-crash.cpp | 89 +++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 clang/test/SemaTemplate/deduction-crash.cpp (limited to 'clang/test/SemaTemplate/deduction-crash.cpp') diff --git a/clang/test/SemaTemplate/deduction-crash.cpp b/clang/test/SemaTemplate/deduction-crash.cpp new file mode 100644 index 0000000..cf3899f --- /dev/null +++ b/clang/test/SemaTemplate/deduction-crash.cpp @@ -0,0 +1,89 @@ +// RUN: %clang_cc1 -fsyntax-only %s 2>&1| FileCheck %s + +// Note that the error count below doesn't matter. We just want to +// make sure that the parser doesn't crash. +// CHECK: 13 errors + +// PR7511 +template +struct int_; + +template +template +struct ac +{ + typedef T1 ae +}; + +templatestruct aaa +{ + typedef ac<1,int,int>::ae ae +}; + +template +struct state_machine +{ + typedef aaa::ae aaa; + int start() + { + ant(0); + } + + template + struct region_processing_helper + { + template + struct In; + + template + struct In,my>; + + template + int process(Event) + { + In > a; + } + } + template + int ant(Event) + { + region_processing_helper* helper; + helper->process(0) + } +}; + +int a() +{ + state_machine p; + p.ant(0); +} + +// PR9974 +template struct enable_if; +template struct remove_reference ; +template struct remove_reference<_Tp&> ; + +template struct __tuple_like; + +template ::type>::value> +struct __tuple_convertible; + +struct pair +{ +template::value>::type> +pair(_Tuple&& ); +}; + +template struct basic_ostream; + +template +void endl( ) ; + +extern basic_ostream cout; + +int operator<<( basic_ostream , pair ) ; + +void register_object_imp ( ) +{ +cout << endl<1>; +} -- cgit v1.2.3