[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Sema / arm64-inline-asm.c
blobc804478ea68d55575d245b8d5464bac473643d12
1 // RUN: %clang_cc1 -triple arm64-apple-ios7.1 -fsyntax-only -verify %s
3 void foo(void) {
4 asm volatile("USE(%0)" :: "z"(0LL));
5 asm volatile("USE(%x0)" :: "z"(0LL));
6 asm volatile("USE(%w0)" :: "z"(0));
8 asm volatile("USE(%0)" :: "z"(0)); // expected-warning {{value size does not match register size specified by the constraint and modifier}} expected-note {{use constraint modifier "w"}}
11 void test_clobber_conflict(void) {
12 register long x asm("x1");
13 asm volatile("nop" :: "r"(x) : "%x1"); // expected-error {{conflicts with asm clobber list}}
14 asm volatile("nop" : "=r"(x) :: "%x1"); // expected-error {{conflicts with asm clobber list}}