[clang] cirgenmodule buildtopleveldecl husk (PR #90831)
via cfe-commits
cfe-commits at lists.llvm.org
Thu May 2 00:59:08 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff e3f42b02a4129947ca2dd820bfb63ffed83027b7 e57548737a72c5308e23fb442774b9bd9eca0bfa -- clang/include/clang/CIR/CIRGenerator.h clang/include/clang/CIRFrontendAction/CIRGenAction.h clang/lib/CIR/CodeGen/CIRGenModule.cpp clang/lib/CIR/CodeGen/CIRGenModule.h clang/lib/CIR/CodeGen/CIRGenTypeCache.h clang/lib/CIR/CodeGen/CIRGenerator.cpp clang/lib/CIR/FrontendAction/CIRGenAction.cpp clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/include/clang/CIRFrontendAction/CIRGenAction.h b/clang/include/clang/CIRFrontendAction/CIRGenAction.h
index 02c906b173..a12f149b82 100644
--- a/clang/include/clang/CIRFrontendAction/CIRGenAction.h
+++ b/clang/include/clang/CIRFrontendAction/CIRGenAction.h
@@ -37,9 +37,7 @@ private:
protected:
CIRGenAction(OutputType action, mlir::MLIRContext *mlirContext = nullptr);
- void foo() {
-
- }
+ void foo() {}
std::unique_ptr<clang::ASTConsumer>
CreateASTConsumer(clang::CompilerInstance &CI,
diff --git a/clang/lib/CIR/CodeGen/CIRGenModule.cpp b/clang/lib/CIR/CodeGen/CIRGenModule.cpp
index c9ed81a749..abf3d15dbc 100644
--- a/clang/lib/CIR/CodeGen/CIRGenModule.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenModule.cpp
@@ -17,5 +17,4 @@
using namespace cir;
// Emit code for a single top level declaration.
-void CIRGenModule::buildTopLevelDecl(Decl *decl) {
-}
+void CIRGenModule::buildTopLevelDecl(Decl *decl) {}
diff --git a/clang/lib/CIR/CodeGen/CIRGenModule.h b/clang/lib/CIR/CodeGen/CIRGenModule.h
index 4fbd441b7a..2f07d6ce72 100644
--- a/clang/lib/CIR/CodeGen/CIRGenModule.h
+++ b/clang/lib/CIR/CodeGen/CIRGenModule.h
@@ -15,10 +15,10 @@
#include "CIRGenTypeCache.h"
+#include "mlir/IR/MLIRContext.h"
#include "clang/AST/ASTContext.h"
#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/Diagnostic.h"
-#include "mlir/IR/MLIRContext.h"
using namespace clang;
namespace cir {
diff --git a/clang/lib/CIR/CodeGen/CIRGenTypeCache.h b/clang/lib/CIR/CodeGen/CIRGenTypeCache.h
index e23c6b0531..f4e6de5554 100644
--- a/clang/lib/CIR/CodeGen/CIRGenTypeCache.h
+++ b/clang/lib/CIR/CodeGen/CIRGenTypeCache.h
@@ -20,7 +20,6 @@ namespace cir {
/// constructor and then copied around into new CIRGenFunction's.
struct CIRGenTypeCache {
CIRGenTypeCache() {}
-
};
} // namespace cir
diff --git a/clang/lib/CIR/FrontendAction/CIRGenAction.cpp b/clang/lib/CIR/FrontendAction/CIRGenAction.cpp
index 5d75ad1c15..c3312e63c5 100644
--- a/clang/lib/CIR/FrontendAction/CIRGenAction.cpp
+++ b/clang/lib/CIR/FrontendAction/CIRGenAction.cpp
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/CIR/CIRGenerator.h"
#include "clang/CIRFrontendAction/CIRGenAction.h"
+#include "clang/CIR/CIRGenerator.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/MLIRContext.h"
diff --git a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
index ff1216992c..563e8473f4 100644
--- a/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
+++ b/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
@@ -67,7 +67,8 @@ CreateFrontendBaseAction(CompilerInstance &CI) {
case EmitAssembly: return std::make_unique<EmitAssemblyAction>();
case EmitBC: return std::make_unique<EmitBCAction>();
#if CLANG_ENABLE_CIR
- case EmitCIR: return std::make_unique<::cir::EmitCIRAction>();
+ case EmitCIR:
+ return std::make_unique<::cir::EmitCIRAction>();
#else
case EmitCIR:
llvm_unreachable("CIR suppport not built into clang");
``````````
</details>
https://github.com/llvm/llvm-project/pull/90831
More information about the cfe-commits
mailing list