[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


================
@@ -5246,11 +5254,22 @@ GetAttributeHeadingAndSpellings(const Record &Documentation,
   // documentation. This may not be a limiting factor since the spellings
   // should generally be consistently applied across the category.
 
+  if (Cat == "HLSL Semantics") {
+    if (!Attribute.getName().starts_with("HLSL"))
+      PrintFatalError(Attribute.getLoc(),
+                      "HLSL semantic attribute name must start with HLSL");
+
+    assert(Attribute.getName().size() > 4);
+    std::string Name = Attribute.getName().substr(4).str();
+    return std::make_pair(std::move(Name), SpellingList());
+  }
+
   std::vector<FlattenedSpelling> Spellings = GetFlattenedSpellings(Attribute);
-  if (Spellings.empty())
+  if (Spellings.empty()) {
----------------
erichkeane wrote:

Unrelated change?  

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


More information about the cfe-commits mailing list