[PATCH] D53081: [clang-doc] Add unit tests for serialization

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 14 19:59:19 PDT 2018


phosek added inline comments.


================
Comment at: clang-tools-extra/unittests/clang-doc/SerializeTest.cpp:27
+comments::FullComment *
+getComment(const NamedDecl *D) const {
+  if (RawComment *Comment = D->getASTContext().getRawCommentForDeclNoCache(D)) {
----------------
Nit: this function seems to be wrongly indented.


================
Comment at: clang-tools-extra/unittests/clang-doc/SerializeTest.cpp:40
+  bool VisitNamespaceDecl(const NamespaceDecl *D) {
+    auto I = serialize::emitInfo(D, getComment(D), /*Line*/ 0,
+                                 /*File=*/"test.cpp", Public);
----------------
Nit: this should be `/*Line=*/` for consistency, the same below.


https://reviews.llvm.org/D53081





More information about the cfe-commits mailing list