From 0bad578cf3572506196e6f944aebc05d295c4e14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Alvarez?= Date: Wed, 7 Apr 2021 00:15:04 +0200 Subject: [PATCH] [docs] Fix doxygen comments wrongly attached to the llvm namespace Looking at the Doxygen-generated documentation for the llvm namespace currently shows all sorts of random comments from different parts of the codebase. These are mostly caused by: - File doc comments that aren't marked with \file, so they're attached to the next declaration, which is usually "namespace llvm {". - Class doc comments placed before the namespace rather than before the class. - Code comments before the namespace that (in my opinion) shouldn't be extracted by doxygen at all. This commit fixes these comments. The generated doxygen documentation now has proper docs for several classes and files, and the docs for the llvm and llvm::detail namespaces are now empty. Reviewed By: thakis, mizvekov Differential Revision: https://reviews.llvm.org/D96736 --- include/llvm/ADT/STLExtras.h | 16 ++++++------ include/llvm/Analysis/ValueLattice.h | 4 +-- include/llvm/BinaryFormat/MsgPackDocument.h | 2 +- include/llvm/CodeGen/AccelTable.h | 7 ++--- include/llvm/CodeGen/GlobalISel/CSEInfo.h | 4 +-- include/llvm/CodeGen/GlobalISel/Combiner.h | 4 +-- .../llvm/CodeGen/GlobalISel/CombinerHelper.h | 4 +-- .../llvm/CodeGen/GlobalISel/CombinerInfo.h | 2 +- .../CodeGen/GlobalISel/GISelChangeObserver.h | 5 ++-- .../llvm/CodeGen/GlobalISel/GISelKnownBits.h | 5 ++-- .../llvm/CodeGen/GlobalISel/LegalizerInfo.h | 4 +-- .../CodeGen/GlobalISel/LostDebugLocObserver.h | 4 +-- .../llvm/CodeGen/GlobalISel/MIPatternMatch.h | 5 ++-- .../llvm/CodeGen/GlobalISel/RegBankSelect.h | 5 ++-- include/llvm/CodeGen/LowLevelType.h | 4 +-- include/llvm/CodeGen/Passes.h | 4 +-- include/llvm/CodeGen/TargetPassConfig.h | 4 +-- .../ExecutionEngine/Orc/SpeculateAnalyses.h | 2 +- include/llvm/IR/GlobalIFunc.h | 2 +- include/llvm/IR/PassManagerImpl.h | 2 +- include/llvm/IR/PassManagerInternal.h | 2 +- include/llvm/InterfaceStub/ELFObjHandler.h | 2 +- include/llvm/Support/BinaryStreamArray.h | 23 +++++++++------- include/llvm/Support/Chrono.h | 26 +++++++++---------- include/llvm/Support/LowLevelTypeImpl.h | 4 +-- include/llvm/Support/OptimizedStructLayout.h | 3 ++- lib/CodeGen/EdgeBundles.cpp | 2 +- lib/CodeGen/LiveRangeUtils.h | 4 +-- lib/CodeGen/MachineSSAUpdater.cpp | 4 +-- lib/Target/Hexagon/HexagonISelDAGToDAG.cpp | 3 +-- lib/Target/X86/ImmutableGraph.h | 2 +- lib/Target/X86/X86OptimizeLEAs.cpp | 2 +- 32 files changed, 87 insertions(+), 79 deletions(-) diff --git a/include/llvm/ADT/STLExtras.h b/include/llvm/ADT/STLExtras.h index dd09cf8cc9e..208156ceaaf 100644 --- a/include/llvm/ADT/STLExtras.h +++ b/include/llvm/ADT/STLExtras.h @@ -79,13 +79,6 @@ template struct make_const_ref { typename std::add_const::type>::type; }; -/// Utilities for detecting if a given trait holds for some set of arguments -/// 'Args'. For example, the given trait could be used to detect if a given type -/// has a copy assignment operator: -/// template -/// using has_copy_assign_t = decltype(std::declval() -/// = std::declval()); -/// bool fooHasCopyAssign = is_detected::value; namespace detail { template using void_t = void; template class Op, class... Args> struct detector { @@ -97,16 +90,23 @@ struct detector>, Op, Args...> { }; } // end namespace detail +/// Detects if a given trait holds for some set of arguments 'Args'. +/// For example, the given trait could be used to detect if a given type +/// has a copy assignment operator: +/// template +/// using has_copy_assign_t = decltype(std::declval() +/// = std::declval()); +/// bool fooHasCopyAssign = is_detected::value; template