From ecb7e5c8afe929ee38155db94de6b084ec32a645 Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Tue, 16 Feb 2010 09:31:36 +0000 Subject: Update clang to r96341. --- test/SemaTemplate/instantiate-expr-1.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'test/SemaTemplate/instantiate-expr-1.cpp') diff --git a/test/SemaTemplate/instantiate-expr-1.cpp b/test/SemaTemplate/instantiate-expr-1.cpp index 663749ddce5b..d1b05f66a586 100644 --- a/test/SemaTemplate/instantiate-expr-1.cpp +++ b/test/SemaTemplate/instantiate-expr-1.cpp @@ -87,6 +87,18 @@ void add(const T &x) { (void)(x + x); } +namespace PR6237 { + template + void f(T t) { + t++; + } + + struct B { }; + B operator++(B &, int); + + template void f(B); +} + struct Addable { Addable operator+(const Addable&) const; }; @@ -112,3 +124,16 @@ void test_call_operator(CallOperator call_op, int i, double d) { int &ir = test_call_operator(call_op, i); double &dr = test_call_operator(call_op, d); } + +template +void test_asm(T t) { + asm ("nop" : "=a"(*t) : "r"(*t)); // expected-error {{indirection requires pointer operand ('int' invalid)}} +} + +void test_asm() { + int* a; + test_asm(a); + + int b; + test_asm(b); // expected-note {{in instantiation of function template specialization 'test_asm' requested here}} +} -- cgit v1.3