[clang] b0322a4 - [docs] Fix doxygen comments wrongly attached to the clang namespace

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 20 10:50:22 PDT 2021


Author: Nicolás Alvarez
Date: 2021-04-20T13:50:11-04:00
New Revision: b0322a4ed2b2d5a5b3b0ea2ef4da40606f6838d1

URL: https://github.com/llvm/llvm-project/commit/b0322a4ed2b2d5a5b3b0ea2ef4da40606f6838d1
DIFF: https://github.com/llvm/llvm-project/commit/b0322a4ed2b2d5a5b3b0ea2ef4da40606f6838d1.diff

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

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.

Differential Revision: https://reviews.llvm.org/D96738

Added: 
    

Modified: 
    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

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/AST/ExternalASTSource.h b/clang/include/clang/AST/ExternalASTSource.h
index caae0770931b..6ec6edb858e9 100644
--- a/clang/include/clang/AST/ExternalASTSource.h
+++ b/clang/include/clang/AST/ExternalASTSource.h
@@ -462,10 +462,10 @@ struct LazyGenerationalUpdatePtr {
 
 } // 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<

diff  --git a/clang/include/clang/Analysis/FlowSensitive/DataflowValues.h b/clang/include/clang/Analysis/FlowSensitive/DataflowValues.h
index 68d935c6a400..ab96cd5169a2 100644
--- a/clang/include/clang/Analysis/FlowSensitive/DataflowValues.h
+++ b/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 {};

diff  --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopUnrolling.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopUnrolling.h
index d25d26435454..53b221cb53c9 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopUnrolling.h
+++ b/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

diff  --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopWidening.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopWidening.h
index 7484a51b1eda..e75228f92a8e 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopWidening.h
+++ b/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.


        


More information about the cfe-commits mailing list