From b0322a4ed2b2d5a5b3b0ea2ef4da40606f6838d1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicol=C3=A1s=20Alvarez?= Date: Tue, 20 Apr 2021 13:49:27 -0400 Subject: [PATCH] [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 --- clang/include/clang/AST/ExternalASTSource.h | 4 ++-- clang/include/clang/Analysis/FlowSensitive/DataflowValues.h | 3 ++- clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopUnrolling.h | 3 +-- clang/include/clang/StaticAnalyzer/Core/PathSensitive/LoopWidening.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/clang/include/clang/AST/ExternalASTSource.h b/clang/include/clang/AST/ExternalASTSource.h index caae077..6ec6edb 100644 --- a/clang/include/clang/AST/ExternalASTSource.h +++ b/clang/include/clang/AST/ExternalASTSource.h @@ -462,10 +462,10 @@ public: } // 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 struct PointerLikeTypeTraits< diff --git a/clang/include/clang/Analysis/FlowSensitive/DataflowValues.h b/clang/include/clang/Analysis/FlowSensitive/DataflowValues.h index 68d935c..ab96cd5 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 d25d264..53b221c 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 7484a51..e75228f 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. -- 2.7.4