mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 13:06:06 +00:00

Remain InheritableAttr to avoid the warning `TypePrinter.cpp:1953:10: warning: enumeration value ‘TargetVersion’ not handled in switch` origin messenge [TargetVersion] Only enable on RISC-V and AArch64 (#115991) Address #115000. This patch constrains the target_version feature to work only on RISC-V and AArch64 to prevent crashes in Clang. Co-authored-by: Aaron Ballman <aaron@aaronballman.com>
5 lines
212 B
C
5 lines
212 B
C
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -verify %s
|
|
|
|
//expected-warning@+1 {{unknown attribute 'target_version' ignored}}
|
|
int __attribute__((target_version("aes"))) foo(void) { return 3; }
|