Skip to content

Comments

Fix some uses of using namespace#9528

Open
hzeller wants to merge 1 commit intoThe-OpenROAD-Project:masterfrom
hzeller:feature-20260223-no-use-ns
Open

Fix some uses of using namespace#9528
hzeller wants to merge 1 commit intoThe-OpenROAD-Project:masterfrom
hzeller:feature-20260223-no-use-ns

Conversation

@hzeller
Copy link
Collaborator

@hzeller hzeller commented Feb 23, 2026

No description provided.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces the broad using namespace sta; with specific using declarations in RepairDesign.cc and RepairHold.cc. This is a good practice to avoid namespace pollution and potential symbol conflicts. However, some symbols that were previously available via the sta namespace (either directly or through nested using declarations in OpenSTA headers) are now missing, which will lead to compilation errors. Specifically, sta::Slacks and std::sort need to be explicitly imported or qualified where they are used unqualified.

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@hzeller hzeller force-pushed the feature-20260223-no-use-ns branch 2 times, most recently from bb05061 to cd6c3f9 Compare February 23, 2026 17:42
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Signed-off-by: Henner Zeller <h.zeller@acm.org>
@hzeller hzeller force-pushed the feature-20260223-no-use-ns branch from cd6c3f9 to 692a6a7 Compare February 23, 2026 17:54
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@povik
Copy link
Contributor

povik commented Feb 23, 2026

What's the motivation? I understood the motivation to get rid of using from headers but I'm not sure why using namespace would be undesirable in these .cc files. My experience is it's an additional burden to keep those using sections updated during rsz development. It uses a lot of sta types.

@povik
Copy link
Contributor

povik commented Feb 23, 2026

I see #9525, let's discuss there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants