[clang] [Clang][docs] Modify generator for HLSL semantics documentation (PR #157841)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 10 09:06:31 PDT 2025


================
@@ -5296,37 +5315,39 @@ static void WriteDocumentation(const RecordKeeper &Records,
     OS << ".. _" << Label << ":\n\n";
   OS << Doc.Heading << "\n" << std::string(Doc.Heading.length(), '-') << "\n";
 
-  // List what spelling syntaxes the attribute supports.
-  // Note: "#pragma clang attribute" is handled outside the spelling kinds loop
-  // so it must be last.
-  OS << ".. csv-table:: Supported Syntaxes\n";
-  OS << "   :header: \"GNU\", \"C++11\", \"C23\", \"``__declspec``\",";
-  OS << " \"Keyword\", \"``#pragma``\", \"HLSL Annotation\", \"``#pragma "
-        "clang ";
-  OS << "attribute``\"\n\n   \"";
-  for (size_t Kind = 0; Kind != NumSpellingKinds; ++Kind) {
-    SpellingKind K = (SpellingKind)Kind;
-    // TODO: List Microsoft (IDL-style attribute) spellings once we fully
-    // support them.
-    if (K == SpellingKind::Microsoft)
-      continue;
+  if (Doc.SupportedSpellings.getSpellingCount() > 0) {
----------------
erichkeane wrote:

Perhaps `SupportedSpellings` shouldn't have a `getSpellingCount`, it should have a `hasSpelling`?

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


More information about the cfe-commits mailing list