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 | c0ebb9412c7e3ead164b2c3497fef7d6be774992 (patch) | |
| tree | d808380379ba5a4d6f960e59797b0791ec7c4e1a /clang/test/SemaTemplate | |
| parent | aaeef07280fef8a8d86be631c4c817ef3e59902b (diff) | |
| download | bcm5719-llvm-c0ebb9412c7e3ead164b2c3497fef7d6be774992.tar.gz bcm5719-llvm-c0ebb9412c7e3ead164b2c3497fef7d6be774992.zip | |
Land test case.
llvm-svn: 94362
Diffstat (limited to 'clang/test/SemaTemplate')
| -rw-r--r-- | clang/test/SemaTemplate/instantiate-expr-1.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/SemaTemplate/instantiate-expr-1.cpp b/clang/test/SemaTemplate/instantiate-expr-1.cpp index 663749ddce5..34fc6af746d 100644 --- a/clang/test/SemaTemplate/instantiate-expr-1.cpp +++ b/clang/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}} +} |

