diff options
author | Anders Carlsson <andersca@mac.com> | 2010-01-24 05:50:37 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-01-24 05:50:37 +0000 |
commit | b2e90aca3ed07f48a536acb3c4c5ade567703cbf (patch) | |
tree | 825f24d6bff0efdb637f44df2ff3a12157250e63 | |
parent | 703e39486689d6660e75f6b6de0068db031a51c7 (diff) |
Land test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94362 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/SemaTemplate/instantiate-expr-1.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-expr-1.cpp b/test/SemaTemplate/instantiate-expr-1.cpp index 663749ddce..34fc6af746 100644 --- a/test/SemaTemplate/instantiate-expr-1.cpp +++ b/test/SemaTemplate/instantiate-expr-1.cpp @@ -112,3 +112,16 @@ void test_call_operator(CallOperator call_op, int i, double d) { int &ir = test_call_operator<int&>(call_op, i); double &dr = test_call_operator<double&>(call_op, d); } + +template<typename T> +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<int>' requested here}} +} |