[clang] [HLSL] Run availability diagnostic on exported functions (PR #97352)

Helena Kotas via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 1 15:57:04 PDT 2024


================
@@ -129,6 +129,55 @@ class MyClass
   }
 };
 
+// Exported function without body - not used
+export void exportedFunctionUnused(float f);
----------------
hekota wrote:

Good catch! This is currently not reporting an error and the redeclaration is not recognized as exported function and therefore not included in the diagnostic scan. I believe the check whether to scan a function or not should be based on whether the function has an external linkage or not. This cannot be implemented until issue #92071 is resolved though. I'll see if I can fix this without the default linkage change.


https://github.com/llvm/llvm-project/pull/97352


More information about the cfe-commits mailing list