From d34d51c66023632c4682e3d952077758f3ba5656 Mon Sep 17 00:00:00 2001 From: Matt Liberty Date: Thu, 9 Jan 2025 14:50:33 +0000 Subject: [PATCH] Ignore the build directory in clang-tidy Signed-off-by: Matt Liberty --- .gitignore | 2 ++ etc/run-clang-tidy-cached.cc | 3 ++- src/drt/src/TritonRoute.cpp | 14 ++++++++------ src/drt/src/gc/FlexGC.cpp | 2 +- src/drt/src/io/GuideProcessor.h | 2 +- src/drt/src/pa/FlexPA.cpp | 2 +- src/drt/src/ta/FlexTA.h | 2 +- 7 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 1d6b7d1c547..65291712d77 100644 --- a/.gitignore +++ b/.gitignore @@ -41,6 +41,8 @@ coverage-output .metals/ etc/openroad_deps_prefixes.txt +etc/run-clang-tidy-cached +OpenROAD_clang-tidy.* *debhelper* debian/changelog diff --git a/etc/run-clang-tidy-cached.cc b/etc/run-clang-tidy-cached.cc index e003c4dcec9..09735899d24 100755 --- a/etc/run-clang-tidy-cached.cc +++ b/etc/run-clang-tidy-cached.cc @@ -125,7 +125,8 @@ static constexpr ConfigValues kConfig = { .start_dir = "src/", .file_exclude_re = "src/sta/" // Don't check 3rd-party submodule - "|codeGenerator/templates/", + "|codeGenerator/templates/" + "|build/", // Don't check generated code .revisit_brokenfiles_if_build_config_newer = false, }; // -------------------------------------------------------------- diff --git a/src/drt/src/TritonRoute.cpp b/src/drt/src/TritonRoute.cpp index f9321b3d180..f71d28694aa 100644 --- a/src/drt/src/TritonRoute.cpp +++ b/src/drt/src/TritonRoute.cpp @@ -220,9 +220,10 @@ std::string TritonRoute::runDRWorker(const std::string& workerStr, { bool on = debug_->debugDR; std::unique_ptr graphics_ - = on && FlexDRGraphics::guiActive() ? std::make_unique( - debug_.get(), design_.get(), db_, logger_) - : nullptr; + = on && FlexDRGraphics::guiActive() + ? std::make_unique( + debug_.get(), design_.get(), db_, logger_) + : nullptr; auto worker = FlexDRWorker::load( workerStr, viaData, design_.get(), logger_, router_cfg_.get()); worker->setGraphics(graphics_.get()); @@ -250,9 +251,10 @@ void TritonRoute::debugSingleWorker(const std::string& dumpDir, ar >> viaData; std::unique_ptr graphics - = on && FlexDRGraphics::guiActive() ? std::make_unique( - debug_.get(), design_.get(), db_, logger_) - : nullptr; + = on && FlexDRGraphics::guiActive() + ? std::make_unique( + debug_.get(), design_.get(), db_, logger_) + : nullptr; std::ifstream workerFile(fmt::format("{}/worker.bin", dumpDir), std::ios::binary); std::string workerStr((std::istreambuf_iterator(workerFile)), diff --git a/src/drt/src/gc/FlexGC.cpp b/src/drt/src/gc/FlexGC.cpp index 137c0d9dc71..c913095b540 100644 --- a/src/drt/src/gc/FlexGC.cpp +++ b/src/drt/src/gc/FlexGC.cpp @@ -37,7 +37,7 @@ FlexGCWorker::FlexGCWorker(frTechObject* techIn, RouterConfiguration* router_cfg, FlexDRWorker* drWorkerIn) : impl_( - std::make_unique(techIn, logger, router_cfg, drWorkerIn, this)) + std::make_unique(techIn, logger, router_cfg, drWorkerIn, this)) { } diff --git a/src/drt/src/io/GuideProcessor.h b/src/drt/src/io/GuideProcessor.h index bfd2a175005..b9bdc836454 100644 --- a/src/drt/src/io/GuideProcessor.h +++ b/src/drt/src/io/GuideProcessor.h @@ -53,7 +53,7 @@ class GuideProcessor : design_(designIn), logger_(loggerIn), db_(dbIn), - router_cfg_(router_cfg){}; + router_cfg_(router_cfg) {}; /** * @brief Reads guides from odb and fill the tmp_guides_ list of unprocessed * guides diff --git a/src/drt/src/pa/FlexPA.cpp b/src/drt/src/pa/FlexPA.cpp index b98822dd93e..eaea9f0e1e9 100644 --- a/src/drt/src/pa/FlexPA.cpp +++ b/src/drt/src/pa/FlexPA.cpp @@ -72,7 +72,7 @@ void FlexPA::setDebug(frDebugSettings* settings, odb::dbDatabase* db) const bool on = settings->debugPA; graphics_ = on && FlexPAGraphics::guiActive() ? std::make_unique( - settings, design_, db, logger_, router_cfg_) + settings, design_, db, logger_, router_cfg_) : nullptr; } diff --git a/src/drt/src/ta/FlexTA.h b/src/drt/src/ta/FlexTA.h index a37e03e331b..d9f023f729d 100644 --- a/src/drt/src/ta/FlexTA.h +++ b/src/drt/src/ta/FlexTA.h @@ -135,7 +135,7 @@ class FlexTAWorker numAssigned_(0), totCost_(0), maxRetry_(1), - hardIroutesMode(false){}; + hardIroutesMode(false) {}; // setters void setRouteBox(const Rect& boxIn) { routeBox_ = boxIn; } void setExtBox(const Rect& boxIn) { extBox_ = boxIn; }