================ @@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c -verify %s +// RUN: %clang_cc1 -triple %itanium_abi_triple -Wunused -x c++ -verify=expected,cxx %s + +#ifdef __cplusplus +extern "C" { +#endif +static int f(void) { return 42; } +int g(void) __attribute__((alias("f"))); + +static int foo [] = { 42, 0xDEAD }; // cxx-warning{{variable 'foo' is not needed and will not be emitted}} ---------------- nickdesaulniers wrote:
Why should we warn here? Is it because `bar` is itself unused, or because its `alias` isn't mangled? https://github.com/llvm/llvm-project/pull/87130 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits