[clang] [HLSL] Disallow virtual inheritance and functions (PR #127346)
Chris B via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 9 10:18:35 PDT 2025
================
@@ -1817,5 +1817,9 @@ def ext_hlsl_access_specifiers : ExtWarn<
InGroup<HLSLExtension>;
def err_hlsl_unsupported_component : Error<"invalid component '%0' used; expected 'x', 'y', 'z', or 'w'">;
def err_hlsl_packoffset_invalid_reg : Error<"invalid resource class specifier '%0' for packoffset, expected 'c'">;
+def err_hlsl_virtual_function
----------------
llvm-beanz wrote:
Unfortunately sharing the diagnostic would require a significant reworking of ParseDecl. The diagnostic for virtual functions is not emitted directly at the place where we encounter the keyword, instead we set the decl to invalid and provide the diagnostic ID. There isn't a way currently to also provide diagnostic arguments.
https://github.com/llvm/llvm-project/pull/127346
More information about the cfe-commits
mailing list