This is an archive of the discontinued LLVM Phabricator instance.

[clang-doc] Handle anonymous namespaces
ClosedPublic

Authored by juliehockett on Oct 3 2018, 2:23 PM.

Details

Summary

Improves output for anonymous decls, and updates the '--public' flag to exclude everything under an anonymous namespace.

Diff Detail

Repository
rL LLVM

Event Timeline

juliehockett created this revision.Oct 3 2018, 2:23 PM
leonardchan added inline comments.Oct 3 2018, 3:34 PM
clang-tools-extra/clang-doc/Representation.cpp
193–216 ↗(On Diff #168172)

Nit: Check for Name.empty() early and return Name if it is empty, then have the switch stmt to avoid the repeated conditional expressions.

if (!Name.empty())
  return Name

switch () {
  case InfoType::IT_namespace:
    return llvm::SmallString<16>("GlobalNamespace");
  ...
}
clang-tools-extra/clang-doc/Serialize.cpp
280 ↗(On Diff #168172)

Should this line be Namespace = N->getNameAsString()?

juliehockett marked 2 inline comments as done.
leonardchan accepted this revision.Jun 28 2019, 11:37 AM
This revision is now accepted and ready to land.Jun 28 2019, 11:37 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJun 28 2019, 12:08 PM