forked from OSchip/llvm-project
parent
aaeef07280
commit
c0ebb9412c
|
@ -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}}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue