[clang] Forcefully require new attributes to be documented (PR #203296)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 11 09:19:23 PDT 2026


================
@@ -5568,6 +5568,49 @@ static void WriteDocumentation(const RecordKeeper &Records,
   OS << "\n\n\n";
 }
 
+void GetListOfUndocumentedAttributes(
+    const RecordKeeper &Records,
+    std::vector<const Record *> &UndocumentedAttrs) {
+  const Record *Documentation = Records.getDef("GlobalDocumentation");
+  if (!Documentation) {
+    PrintFatalError("The Documentation top-level definition is missing.");
+    return;
+  }
+
+  for (const auto *A : Records.getAllDerivedDefinitions("Attr")) {
----------------
AaronBallman wrote:

`Record *` and we use this pattern about ten times in the file. I can switch though if you prefer.

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


More information about the cfe-commits mailing list