[clang] Enable unguarded availability diagnostic on instantiated template functions (PR #91699)
Emma Pilkington via cfe-commits
cfe-commits at lists.llvm.org
Fri May 10 11:18:13 PDT 2024
================
@@ -177,16 +177,19 @@ void justAtAvailable(void) {
#ifdef OBJCPP
-int f(char) AVAILABLE_10_12;
+int f(char) AVAILABLE_10_12; // #f_char_def
int f(int);
template <class T> int use_f() {
- // FIXME: We should warn here!
- return f(T());
----------------
epilk wrote:
Could you check that we don't emit a warning if there is an availability attribute on the enclosing function or if the use is guarded by an `if (@available(...))` check? IIRC that that was what I was concerned about when I wrote this. @jansvoboda11 : someone at Apple should probably review this.
https://github.com/llvm/llvm-project/pull/91699
More information about the cfe-commits
mailing list