mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 06:56:44 +00:00

... and set an explicit target triple. Should fix buildbot issues like: https://lab.llvm.org/buildbot/#/builders/245/builds/20379/steps/5/logs/FAIL__Clang__warn-unused-filescoped_cpp
19 lines
835 B
C++
19 lines
835 B
C++
// RUN: %clang_cc1 -triple arm64-apple-darwin -fsyntax-only -verify -Wunused -std=c++98 %s
|
|
// RUN: %clang_cc1 -triple arm64-apple-darwin -fsyntax-only -verify -Wunused -std=c++14 %s
|
|
|
|
__attribute__((target_version("fp16")))
|
|
static int not_used_fmv(void) { return 1; }
|
|
__attribute__((target_version("fp16fml")))
|
|
static int not_used_fmv(void) { return 2; }
|
|
__attribute__((target_version("default")))
|
|
static int not_used_fmv(void) { return 0; } // expected-warning {{unused function 'not_used_fmv'}}
|
|
|
|
|
|
__attribute__((target_version("fp16")))
|
|
static int definitely_used_fmv(void) { return 1; }
|
|
__attribute__((target_version("fp16fml")))
|
|
static int definitely_used_fmv(void) { return 2; }
|
|
__attribute__((target_version("default")))
|
|
static int definitely_used_fmv(void) { return 0; }
|
|
int definite_user(void) { return definitely_used_fmv(); }
|