[PATCH] D41102: Setup clang-doc frontend framework

Jonas Devlieghere via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 14 06:11:26 PST 2017


JDevlieghere added inline comments.


================
Comment at: tools/clang-doc/ClangDoc.h:40
+
+  void ParseUnattachedComments();
+  bool ParseNewDecl(const NamedDecl *D);
----------------
I know it's confusing given the amount of existing code that uses UpperCamelCase for functions, but I think that (as this is new code) we'd want to stay close to the style guide and use lowerCamelCase where we can. 


================
Comment at: tools/clang-doc/ClangDocReporter.h:35
+
+struct StringPair {
+  std::string Key;
----------------
Do you still need this?


================
Comment at: tools/clang-doc/tool/ClangDocMain.cpp:43
+  doc::OutFormat EmitFormat;
+  EmitLLVM ? EmitFormat = clang::doc::OutFormat::LLVM
+           : EmitFormat = clang::doc::OutFormat::YAML;
----------------
I'm curious if there's a particular reason that you seems to prefer

```
EmitLLVM ? EmitFormat = clang::doc::OutFormat::LLVM
         : EmitFormat = clang::doc::OutFormat::YAML;
```

over

```
EmitFormat = EmitLLVM ? clang::doc::OutFormat::LLVM
                      : clang::doc::OutFormat::YAML;
```


https://reviews.llvm.org/D41102





More information about the cfe-commits mailing list