[PATCH] D96738: [docs] Fix doxygen comments wrongly attached to the clang namespace

Nicolás Alvarez via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 15 16:54:53 PST 2021


nicolas17 created this revision.
Herald added a subscriber: zzheng.
nicolas17 requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Looking at the Doxygen-generated documentation for the clang namespace
currently shows several random comments from different parts of the
codebase. These are caused by:

- File doc comments that aren't marked with \file, so they're attached to the next declaration, which is usually "namespace clang {".
- Class doc comments placed before the namespace rather than before the class.

This commit fixes these comments. The generated doxygen documentation now
has proper docs for several classes and files, and the docs for the clang
namespace is now empty.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96738

Files:
  clang/include/clang/AST/ExternalASTSource.h
  clang/include/clang/Analysis/FlowSensitive/DataflowValues.h
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopUnrolling.h
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopWidening.h


Index: clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopWidening.h
===================================================================
--- clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopWidening.h
+++ clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopWidening.h
@@ -5,7 +5,7 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-///
+/// \file
 /// This header contains the declarations of functions which are used to widen
 /// loops which do not otherwise exit. The widening is done by invalidating
 /// anything which might be modified by the body of the loop.
Index: clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopUnrolling.h
===================================================================
--- clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopUnrolling.h
+++ clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopUnrolling.h
@@ -5,7 +5,7 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-///
+/// \file
 /// This header contains the declarations of functions which are used to decide
 /// which loops should be completely unrolled and mark their corresponding
 /// CFGBlocks. It is done by tracking a stack of loops in the ProgramState. This
@@ -18,7 +18,6 @@
 ///   has to be initialized by a literal in the corresponding initStmt.
 /// - Does not contain goto, switch and returnStmt.
 ///
-///
 //===----------------------------------------------------------------------===//
 
 #ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_LOOPUNROLLING_H
Index: clang/include/clang/Analysis/FlowSensitive/DataflowValues.h
===================================================================
--- clang/include/clang/Analysis/FlowSensitive/DataflowValues.h
+++ clang/include/clang/Analysis/FlowSensitive/DataflowValues.h
@@ -19,13 +19,14 @@
 #include "clang/Analysis/ProgramPoint.h"
 #include "llvm/ADT/DenseMap.h"
 
+namespace clang {
+
 //===----------------------------------------------------------------------===//
 /// Dataflow Directional Tag Classes.  These are used for tag dispatching
 ///  within the dataflow solver/transfer functions to determine what direction
 ///  a dataflow analysis flows.
 //===----------------------------------------------------------------------===//
 
-namespace clang {
 namespace dataflow {
   struct forward_analysis_tag {};
   struct backward_analysis_tag {};
Index: clang/include/clang/AST/ExternalASTSource.h
===================================================================
--- clang/include/clang/AST/ExternalASTSource.h
+++ clang/include/clang/AST/ExternalASTSource.h
@@ -462,10 +462,10 @@
 
 } // namespace clang
 
-/// Specialize PointerLikeTypeTraits to allow LazyGenerationalUpdatePtr to be
-/// placed into a PointerUnion.
 namespace llvm {
 
+/// Specialize PointerLikeTypeTraits to allow LazyGenerationalUpdatePtr to be
+/// placed into a PointerUnion.
 template<typename Owner, typename T,
          void (clang::ExternalASTSource::*Update)(Owner)>
 struct PointerLikeTypeTraits<


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96738.323848.patch
Type: text/x-patch
Size: 3187 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210216/37173162/attachment-0001.bin>


More information about the cfe-commits mailing list