[PATCH] D64279: [Doxygen] Ignore llvm::Expected<T> forward decl so doxgen recommends right header file

Alex Brachet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 6 00:42:35 PDT 2019


abrachet created this revision.
abrachet added reviewers: jhenderson, rupprecht, JDevlieghere, pcc.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The documentation <https://llvm.org/doxygen/classllvm_1_1Expected.html> for llvm::Expected currently suggests that the header file for Expected is Support/CachePruning.h, this is wrong, adding \cond and \endcond forces doxygen to ignore this forward declaration. This does work, and the outputted documentation correctly recommends Support/Error.h, but it is also an ugly addition we shouldn't have to make. This is kind of an unwinnable battle.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D64279

Files:
  llvm/include/llvm/Support/CachePruning.h


Index: llvm/include/llvm/Support/CachePruning.h
===================================================================
--- llvm/include/llvm/Support/CachePruning.h
+++ llvm/include/llvm/Support/CachePruning.h
@@ -19,7 +19,10 @@
 
 namespace llvm {
 
+// Ignore forward declaration to not confuse Doxygen output.
+/// @cond
 template <typename T> class Expected;
+/// @endcond
 
 /// Policy for the pruneCache() function. A default constructed
 /// CachePruningPolicy provides a reasonable default policy.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64279.208259.patch
Type: text/x-patch
Size: 502 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190706/3fb68c77/attachment.bin>


More information about the llvm-commits mailing list