[clang] [clang-tools-extra] [clang] Don't add documentation comments to the AST if not requested (PR #206363)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 29 06:20:17 PDT 2026


================
@@ -157,6 +157,11 @@ class PreprocessorOptions {
   /// clients don't use them.
   bool WriteCommentListToPCH = true;
 
+  /// Force the front end to retain all documentation comments in the AST, even
+  /// when no comment consuming diagnostic or language option is enabled. Tools
+  /// that query comments after parsing set this
----------------
AaronBallman wrote:

```suggestion
  /// that query comments after parsing set this.
```

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


More information about the cfe-commits mailing list