Skip to content

Commit

Permalink
Ignore the build directory in clang-tidy
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Liberty <[email protected]>
  • Loading branch information
maliberty committed Jan 11, 2025
1 parent d3feb61 commit fbc047a
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ coverage-output
.metals/

etc/openroad_deps_prefixes.txt
etc/run-clang-tidy-cached
OpenROAD_clang-tidy.*

*debhelper*
debian/changelog
Expand Down
3 changes: 2 additions & 1 deletion etc/run-clang-tidy-cached.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
// --------------------------------------------------------------
Expand Down
14 changes: 8 additions & 6 deletions src/drt/src/TritonRoute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,10 @@ std::string TritonRoute::runDRWorker(const std::string& workerStr,
{
bool on = debug_->debugDR;
std::unique_ptr<FlexDRGraphics> graphics_
= on && FlexDRGraphics::guiActive() ? std::make_unique<FlexDRGraphics>(
debug_.get(), design_.get(), db_, logger_)
: nullptr;
= on && FlexDRGraphics::guiActive()
? std::make_unique<FlexDRGraphics>(
debug_.get(), design_.get(), db_, logger_)
: nullptr;
auto worker = FlexDRWorker::load(
workerStr, viaData, design_.get(), logger_, router_cfg_.get());
worker->setGraphics(graphics_.get());
Expand Down Expand Up @@ -250,9 +251,10 @@ void TritonRoute::debugSingleWorker(const std::string& dumpDir,
ar >> viaData;

std::unique_ptr<FlexDRGraphics> graphics
= on && FlexDRGraphics::guiActive() ? std::make_unique<FlexDRGraphics>(
debug_.get(), design_.get(), db_, logger_)
: nullptr;
= on && FlexDRGraphics::guiActive()
? std::make_unique<FlexDRGraphics>(
debug_.get(), design_.get(), db_, logger_)
: nullptr;
std::ifstream workerFile(fmt::format("{}/worker.bin", dumpDir),
std::ios::binary);
std::string workerStr((std::istreambuf_iterator<char>(workerFile)),
Expand Down
2 changes: 1 addition & 1 deletion src/drt/src/gc/FlexGC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ FlexGCWorker::FlexGCWorker(frTechObject* techIn,
RouterConfiguration* router_cfg,
FlexDRWorker* drWorkerIn)
: impl_(
std::make_unique<Impl>(techIn, logger, router_cfg, drWorkerIn, this))
std::make_unique<Impl>(techIn, logger, router_cfg, drWorkerIn, this))
{
}

Expand Down
9 changes: 4 additions & 5 deletions src/drt/src/io/GuideProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@ class GuideProcessor
odb::dbDatabase* dbIn,
utl::Logger* loggerIn,
RouterConfiguration* router_cfg)
: design_(designIn),
logger_(loggerIn),
db_(dbIn),
router_cfg_(router_cfg){};
: design_(designIn), logger_(loggerIn), db_(dbIn), router_cfg_(router_cfg)
{
}
/**
* @brief Reads guides from odb and fill the tmp_guides_ list of unprocessed
* guides
Expand Down Expand Up @@ -441,4 +440,4 @@ class GuidePathFinder
frBlockObjectMap<std::set<Point3D>> pin_gcell_map_;
std::vector<frRect> rects_;
};
} // namespace drt::io
} // namespace drt::io
2 changes: 1 addition & 1 deletion src/drt/src/pa/FlexPA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void FlexPA::setDebug(frDebugSettings* settings, odb::dbDatabase* db)
const bool on = settings->debugPA;
graphics_ = on && FlexPAGraphics::guiActive()
? std::make_unique<FlexPAGraphics>(
settings, design_, db, logger_, router_cfg_)
settings, design_, db, logger_, router_cfg_)
: nullptr;
}

Expand Down
4 changes: 3 additions & 1 deletion src/drt/src/ta/FlexTA.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ 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; }
Expand Down
2 changes: 1 addition & 1 deletion src/rsz/src/RepairDesign.cc
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ bool RepairDesign::performGainBuffering(Net* net,
const Network* network_;

public:
PinRequiredHigher(const Network* network) : network_(network){};
PinRequiredHigher(const Network* network) : network_(network) {}

bool operator()(const EnqueuedPin& a, const EnqueuedPin& b) const
{
Expand Down
7 changes: 4 additions & 3 deletions src/rsz/src/Resizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1326,9 +1326,10 @@ LibertyCell* Resizer::findTargetCell(LibertyCell* cell,
for (LibertyCell* target_cell : swappable_cells) {
if (!dontUse(target_cell) && isLinkCell(target_cell)) {
float target_load = (*target_load_map_)[target_cell];
float delay = is_buf_inv ? bufferDelay(
target_cell, load_cap, tgt_slew_dcalc_ap_)
: 0.0;
float delay
= is_buf_inv
? bufferDelay(target_cell, load_cap, tgt_slew_dcalc_ap_)
: 0.0;
float dist = targetLoadDist(load_cap, target_load);
debugPrint(logger_,
RSZ,
Expand Down

0 comments on commit fbc047a

Please sign in to comment.