Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply clang-tidy fixes #102

Merged
merged 17 commits into from Jan 4, 2023
Merged

Apply clang-tidy fixes #102

merged 17 commits into from Jan 4, 2023

Conversation

varunsh-xilinx
Copy link
Member

@varunsh-xilinx varunsh-xilinx commented Jan 3, 2023

Summary of Changes

  • Apply suggestions by clang-tidy for style
  • Apply suggestions by iwyu for including headers

Motivation

clang-tidy helps maintain code quality. Applying the fixes to the existing code allows us to use it on future PRs to ensure new code does not introduce new issues. Similarly, iwyu can also be used to keep headers up-to-date

Implementation

I used the tools/lint-cache.sh script to iterate through the messages from clang-tidy and iwyu for the files in the repository.

Notes

There aren't major changes required after pulling this PR aside from renaming some things:

  • Some function names are changed for style. Should be just replaced with the new name
  • The enum name formats, namely the DataType enum, are changed. The ALL_CAPS variant are supported as aliases for now but this will be removed. The ALL_CAPS names can conflict with macros and are changed to PascalCase.
  • The mapping to/from XIR datatypes is removed from the public API. These kinds of library-specific headers and functionality should be provided in a separate header + library so the main library doesn't bloat with all sorts of very specific functions.

Apply fixes to client headers

Signed-off-by: Varun Sharma <varun.sharma@amd.com>
Signed-off-by: Varun Sharma <varun.sharma@amd.com>
Change constant format in clang-tidy

Signed-off-by: Varun Sharma <varun.sharma@amd.com>
Signed-off-by: Varun Sharma <varun.sharma@amd.com>
Signed-off-by: Varun Sharma <varun.sharma@amd.com>
Signed-off-by: Varun Sharma <varun.sharma@amd.com>
Signed-off-by: Varun Sharma <varun.sharma@amd.com>
Signed-off-by: Varun Sharma <varun.sharma@amd.com>
Signed-off-by: Varun Sharma <varun.sharma@amd.com>
Signed-off-by: Varun Sharma <varun.sharma@amd.com>
Signed-off-by: Varun Sharma <varun.sharma@amd.com>
Signed-off-by: Varun Sharma <varun.sharma@amd.com>
Signed-off-by: Varun Sharma <varun.sharma@amd.com>
Signed-off-by: Varun Sharma <varun.sharma@amd.com>
Signed-off-by: Varun Sharma <varun.sharma@amd.com>
@gbuildx
Copy link
Collaborator

gbuildx commented Jan 3, 2023

Build failed!

Signed-off-by: Varun Sharma <varun.sharma@amd.com>
@gbuildx
Copy link
Collaborator

gbuildx commented Jan 3, 2023

Build failed!

Signed-off-by: Varun Sharma <varun.sharma@amd.com>
@gbuildx
Copy link
Collaborator

gbuildx commented Jan 4, 2023

Build successful!

@varunsh-xilinx varunsh-xilinx merged commit 1accec6 into main Jan 4, 2023
@varunsh-xilinx varunsh-xilinx deleted the apply-clang-tidy-fixes branch January 4, 2023 22:11
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.

None yet

2 participants