[clang] [AST] Remove clang/AST/CommentDiagnostic.h (PR #117499)

via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 24 09:52:14 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Kazu Hirata (kazutakahirata)

<details>
<summary>Changes</summary>

Since:

  commit d076608d58d1ec55016eb747a995511e3a3f72aa
  Author: Richard Trieu <rtrieu@<!-- -->google.com>
  Date:   Sat Dec 8 05:05:03 2018 +0000

clang/AST/CommentDiagnostic.h has been forwarding to
clang/Basic/DiagnosticParse.h.  This patch removes the indirection and
clang/AST/CommentDiagnostic.h.


---
Full diff: https://github.com/llvm/llvm-project/pull/117499.diff


6 Files Affected:

- (removed) clang/include/clang/AST/CommentDiagnostic.h (-15) 
- (modified) clang/include/module.modulemap (-1) 
- (modified) clang/lib/AST/CommentLexer.cpp (+1-1) 
- (modified) clang/lib/AST/CommentParser.cpp (+1-1) 
- (modified) clang/lib/AST/CommentSema.cpp (+1-1) 
- (modified) clang/lib/Sema/SemaDecl.cpp (+1-1) 


``````````diff
diff --git a/clang/include/clang/AST/CommentDiagnostic.h b/clang/include/clang/AST/CommentDiagnostic.h
deleted file mode 100644
index 2e498d5db38648..00000000000000
--- a/clang/include/clang/AST/CommentDiagnostic.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//===--- CommentDiagnostic.h - Diagnostics for the AST library --*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_AST_COMMENTDIAGNOSTIC_H
-#define LLVM_CLANG_AST_COMMENTDIAGNOSTIC_H
-
-#include "clang/Basic/DiagnosticComment.h"
-
-#endif
-
diff --git a/clang/include/module.modulemap b/clang/include/module.modulemap
index b399f0beee59a1..56b0409e74a150 100644
--- a/clang/include/module.modulemap
+++ b/clang/include/module.modulemap
@@ -111,7 +111,6 @@ module Clang_Diagnostics {
   module All { header "clang/Basic/AllDiagnostics.h" export * }
   module Analysis { textual header "clang/Analysis/Analyses/UnsafeBufferUsageGadgets.def" }
   module AST { header "clang/AST/ASTDiagnostic.h" export * }
-  module Comment { header "clang/AST/CommentDiagnostic.h" export * }
   module Driver { header "clang/Driver/DriverDiagnostic.h" export * }
   module Frontend { header "clang/Frontend/FrontendDiagnostic.h" export * }
   module Lex { header "clang/Lex/LexDiagnostic.h" export * }
diff --git a/clang/lib/AST/CommentLexer.cpp b/clang/lib/AST/CommentLexer.cpp
index f0250fc9fd55eb..ec9a5b480aa295 100644
--- a/clang/lib/AST/CommentLexer.cpp
+++ b/clang/lib/AST/CommentLexer.cpp
@@ -8,8 +8,8 @@
 
 #include "clang/AST/CommentLexer.h"
 #include "clang/AST/CommentCommandTraits.h"
-#include "clang/AST/CommentDiagnostic.h"
 #include "clang/Basic/CharInfo.h"
+#include "clang/Basic/DiagnosticComment.h"
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/ADT/StringSwitch.h"
 #include "llvm/Support/ConvertUTF.h"
diff --git a/clang/lib/AST/CommentParser.cpp b/clang/lib/AST/CommentParser.cpp
index 61508fe886efc0..12ed8e3f1b79a0 100644
--- a/clang/lib/AST/CommentParser.cpp
+++ b/clang/lib/AST/CommentParser.cpp
@@ -8,9 +8,9 @@
 
 #include "clang/AST/CommentParser.h"
 #include "clang/AST/CommentCommandTraits.h"
-#include "clang/AST/CommentDiagnostic.h"
 #include "clang/AST/CommentSema.h"
 #include "clang/Basic/CharInfo.h"
+#include "clang/Basic/DiagnosticComment.h"
 #include "clang/Basic/SourceManager.h"
 #include "llvm/Support/ErrorHandling.h"
 
diff --git a/clang/lib/AST/CommentSema.cpp b/clang/lib/AST/CommentSema.cpp
index 69eda00643a8fa..bd2206bb8a3bc7 100644
--- a/clang/lib/AST/CommentSema.cpp
+++ b/clang/lib/AST/CommentSema.cpp
@@ -9,9 +9,9 @@
 #include "clang/AST/CommentSema.h"
 #include "clang/AST/Attr.h"
 #include "clang/AST/CommentCommandTraits.h"
-#include "clang/AST/CommentDiagnostic.h"
 #include "clang/AST/Decl.h"
 #include "clang/AST/DeclTemplate.h"
+#include "clang/Basic/DiagnosticComment.h"
 #include "clang/Basic/LLVM.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Lex/Preprocessor.h"
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 74b0e5ad23bd48..1e9db39a7fb579 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -16,7 +16,6 @@
 #include "clang/AST/ASTLambda.h"
 #include "clang/AST/CXXInheritance.h"
 #include "clang/AST/CharUnits.h"
-#include "clang/AST/CommentDiagnostic.h"
 #include "clang/AST/Decl.h"
 #include "clang/AST/DeclCXX.h"
 #include "clang/AST/DeclObjC.h"
@@ -30,6 +29,7 @@
 #include "clang/AST/StmtCXX.h"
 #include "clang/AST/Type.h"
 #include "clang/Basic/Builtins.h"
+#include "clang/Basic/DiagnosticComment.h"
 #include "clang/Basic/PartialDiagnostic.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/TargetInfo.h"

``````````

</details>


https://github.com/llvm/llvm-project/pull/117499


More information about the cfe-commits mailing list