Index file-level comments for C++.
ClosedPublic

Press ? to show keyboard shortcuts.
Author
zarko
Reviewers
shahms
Project Reviewers
Core Team
Commits
rK51fba2b3eae1: Index file-level comments for C++.
Apply Patch
arc patch D1324
Subscribers
salguarnieri, shahms
Projects
None
Summary

This starts to address T178. The first comment block to
appear in a given file is used as the comment that documents
that file. When performing lookups for file-level comments,
this diff uses the global context.

Diff Detail

Repository
rK Kythe
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zarko created this revision.Via ConduitFeb 9 2017, 1:25 PM
zarko added a reviewer: Core Team.
shahms added a subscriber: shahms.Via WebFeb 9 2017, 1:28 PM
shahms added inline comments.
kythe/cxx/indexer/cxx/testdata/BUILD
892

Unless it's covered elsewhere, it's worth adding a test that the first block comment isn't attributed to the file if it immediately precedes another entity, e.g.

#include "some/header.h"

// This is a doc comment for the subsequent class.
class Documented {
...
};

salguarnieri added a subscriber: salguarnieri.Via WebFeb 9 2017, 1:33 PM
salguarnieri added inline comments.
kythe/cxx/indexer/cxx/IndexerASTHooks.cc
780

Is this loop executed more than once?

zarko updated this revision to Diff 3468.Via ConduitFeb 9 2017, 1:43 PM
zarko marked an inline comment as done.
  • Address comments.
kythe/cxx/indexer/cxx/IndexerASTHooks.cc
780

Possibly in the future, but for now no.

kythe/cxx/indexer/cxx/testdata/BUILD
892

Good idea. See the updates to docs_file_level and docs_file_level_conflict.

shahms accepted this revision.Via WebFeb 9 2017, 2:36 PM
shahms added a reviewer: shahms.
This revision is now accepted and ready to land.Via WebFeb 9 2017, 2:36 PM
This revision was automatically updated to reflect the committed changes.

Revision Update History

DiffIDBaseDescriptionCreatedLintUnit
BaseBase
Diff 134673e06c6bFeb 9 2017, 1:25 PM
Diff 234683e06c6b - Address comments.Feb 9 2017, 1:43 PM
Diff 33469f461be2Commit rK51fba2b3eae11e1e4a64352438e49e7c68adace0Feb 9 2017, 3:29 PM

Local Commits

CommitTreeParentsAuthorSummaryDate
37a0f20040ceca26f220da5b52a416b55b51Luke Zarko
Address comments.
Feb 9 2017, 1:40 PM
52a416b55b510d240eec471c3e06c6b0d47eLuke Zarko
Index file-level comments for C++. (Show More…)
Feb 8 2017, 3:36 PM

Diff 3469

kythe/cxx/indexer/cxx/GraphObserver.h

Loading...

kythe/cxx/indexer/cxx/IndexerASTHooks.h

Loading...

kythe/cxx/indexer/cxx/IndexerASTHooks.cc

Loading...

kythe/cxx/indexer/cxx/KytheGraphObserver.h

Loading...

kythe/cxx/indexer/cxx/KytheGraphObserver.cc

Loading...

kythe/cxx/indexer/cxx/testdata/BUILD

Loading...

kythe/cxx/indexer/cxx/testdata/basic/file_node_reentrant.h

Loading...

kythe/cxx/indexer/cxx/testdata/basic/file_node_reentrant.cc

Loading...

kythe/cxx/indexer/cxx/testdata/docs/docs_file_level.cc

Loading...

kythe/cxx/indexer/cxx/testdata/docs/docs_file_level_conflict.cc

Loading...

kythe/cxx/indexer/cxx/testdata/docs/docs_file_level_doxygen.cc

Loading...

kythe/cxx/indexer/cxx/testdata/docs/docs_file_level_includes.cc

Loading...

kythe/cxx/indexer/cxx/testdata/docs/docs_file_level_includes_a.h

Loading...

kythe/cxx/indexer/cxx/testdata/docs/docs_file_level_includes_b.h

Loading...

Add Comment