llvm-project/clang/test/AST/cc-modifier.cpp
PiJoules 70828d9a91
[clang] Alias cc modifier to c (#127719)
https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#GenericOperandmodifiers
provides the `c` and `cc` modifiers. GCC 15 introduces the `cc` modifier
which does the same as `c`. This patch lets Clang handle this for
compatibility.
2025-02-27 11:34:16 -08:00

11 lines
423 B
C++

// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu %s -verify
// expected-no-diagnostics
void func();
void func2();
bool func3() {
__asm__("%cc0 = %c1" : : "X"(func), "X"(func2));
return func2 == func;
}