Skip to content

odb: add lint exception to prevent clang-tidy failure on generated code#10767

Merged
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
AcKoucher:odb-no-lint-generator
Jun 28, 2026
Merged

odb: add lint exception to prevent clang-tidy failure on generated code#10767
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
AcKoucher:odb-no-lint-generator

Conversation

@AcKoucher

Copy link
Copy Markdown
Contributor

Summary

When a dbObject has a single member, the generated operator< code will trigger a clang-tidy warning:

warning: redundant boolean literal in conditional return statement [readability-simplify-boolean-expr]

That causes clang-tidy-bazel CI pipeline to fail (e.g., #10758).

With this change, clang-tidy-bazel CI should pass for such a case.

Type of Change

  • Bug fix

Impact

None.

Verification

  • I have verified that the local build succeeds (./etc/Build.sh).
  • I have run the relevant tests and they pass.
  • My code follows the repository's formatting guidelines.
  • I have signed my commits (DCO).

Signed-off-by: Arthur Koucher <arthurkoucher@precisioninno.com>
@AcKoucher AcKoucher requested a review from a team as a code owner June 27, 2026 18:43
@AcKoucher AcKoucher requested a review from osamahammad21 June 27, 2026 18:43

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

Copy link
Copy Markdown
Contributor

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 introduces linter suppression comments for readability-simplify-boolean-expr in the less-than operator implementations. It conditionally adds NOLINTBEGIN and NOLINTEND blocks in the Jinja template for classes with a single comparison field, and applies the same suppression to the _dbChip less-than operator. There are no review comments to address, and I have no further feedback to provide.

@AcKoucher AcKoucher requested a review from maliberty June 28, 2026 18:04
@maliberty maliberty merged commit b506257 into The-OpenROAD-Project:master Jun 28, 2026
17 checks passed
@AcKoucher AcKoucher deleted the odb-no-lint-generator branch June 28, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants