[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / warn-unused-filescoped-fmv.cpp
blob8c21da5a139f1efe08cfeff94cf455f142dbfde5
1 // RUN: %clang_cc1 -triple arm64-apple-darwin -fsyntax-only -verify -Wunused -std=c++98 %s
2 // RUN: %clang_cc1 -triple arm64-apple-darwin -fsyntax-only -verify -Wunused -std=c++14 %s
4 __attribute__((target_version("fp16")))
5 static int not_used_fmv(void) { return 1; }
6 __attribute__((target_version("fp16fml")))
7 static int not_used_fmv(void) { return 2; }
8 __attribute__((target_version("default")))
9 static int not_used_fmv(void) { return 0; } // expected-warning {{unused function 'not_used_fmv'}}
12 __attribute__((target_version("fp16")))
13 static int definitely_used_fmv(void) { return 1; }
14 __attribute__((target_version("fp16fml")))
15 static int definitely_used_fmv(void) { return 2; }
16 __attribute__((target_version("default")))
17 static int definitely_used_fmv(void) { return 0; }
18 int definite_user(void) { return definitely_used_fmv(); }