[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Sema / heinous-extensions-on.c
blob79c8fe14eefd3d0cf6acb40421ee522199f83c1e
1 // RUN: %clang_cc1 %s -verify -Wno-error=invalid-gnu-asm-cast
3 void foo(void) {
4 int a;
5 // PR3788
6 asm("nop" : : "m"((int)(a))); // expected-warning {{invalid use of a cast in an inline asm context requiring an lvalue}}
7 // PR3794
8 asm("nop" : "=r"((unsigned)a)); // expected-warning {{invalid use of a cast in an inline asm context requiring an lvalue}}