[cfe-commits] r94362 - /cfe/trunk/test/SemaTemplate/instantiate-expr-1.cpp

Anders Carlsson andersca at mac.com
Sat Jan 23 21:50:37 PST 2010


Author: andersca
Date: Sat Jan 23 23:50:37 2010
New Revision: 94362

URL: http://llvm.org/viewvc/llvm-project?rev=94362&view=rev
Log:
Land test case.

Modified:
    cfe/trunk/test/SemaTemplate/instantiate-expr-1.cpp

Modified: cfe/trunk/test/SemaTemplate/instantiate-expr-1.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/instantiate-expr-1.cpp?rev=94362&r1=94361&r2=94362&view=diff

==============================================================================
--- cfe/trunk/test/SemaTemplate/instantiate-expr-1.cpp (original)
+++ cfe/trunk/test/SemaTemplate/instantiate-expr-1.cpp Sat Jan 23 23:50:37 2010
@@ -112,3 +112,16 @@
   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}}
+}





More information about the cfe-commits mailing list