Skip to content

Commit 2793fd4

Browse files
strohelemilio
authored andcommitted
Generator docs: add note about clang documentation string options
I believe this should fix #1265.
1 parent b016304 commit 2793fd4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,14 @@ impl Builder {
719719
/// implement some processing on comments to work around issues as described
720720
/// in [rust-bindgen issue
721721
/// #426](https://github.com/rust-lang/rust-bindgen/issues/426).
722+
///
723+
/// Note that clang by default excludes comments from system headers, pass
724+
/// `-fretain-comments-from-system-headers` as
725+
/// [`clang_arg`][Builder::clang_arg] to include them. It can also be told
726+
/// to process all comments (not just documentation ones) using the
727+
/// `-fparse-all-comments` flag. See [slides on clang comment parsing](
728+
/// https://llvm.org/devmtg/2012-11/Gribenko_CommentParsing.pdf) for
729+
/// background and examples.
722730
pub fn generate_comments(mut self, doit: bool) -> Self {
723731
self.options.generate_comments = doit;
724732
self

0 commit comments

Comments
 (0)