-
Notifications
You must be signed in to change notification settings - Fork 18
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
Clang-tidy and indentation fix #13
Conversation
Add fixme annotations for clang-tidy violations
Fix clang-tidy warnings in sched_basic_data.cpp
Fix clang-tidy warnings in sched_basic_data.h Fix comment indentation in sched_basic_data.h
For whatever reason when I fix the indentation of files it sometimes leaves comments completely unindented. I don't have the patience to search through every file for that so if people could fix those issues when they find them that'd be cool |
This is incorrect indentation and doesn't follow the LLVM conventions. Try: https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/blob/master/lib/comgr/.clang-tidy |
I can't seem to get |
There is a clang-format config file in the same repo. I just use 'clang-format -style=llvm'. Can you just copy the dot file to the reop and run clang-tidy from the command line? |
clang-tidy works by basically compiling the whole source tree. So in general you have to pass it the same commands you give your compiler. CMake obviously complicates that, but you can have CMake generate a "compilation database" which tells clang-tidy how to compile your code. I tried generating a compilation database for just the OptSched target, but it doesn't seem to like that. For now I'm just gonna switch to clang-format until I can figure out how to work with clang-tidy. |
Line 24 in c980bbf
I added compilation db by default already. I'm pretty sure llvm does the same. I think maybe it's your ide that's wonky, can't really help you there. |
Hold up don't merge this just yet, I managed to delete |
Its contents were accidentally deleted 2d9d72
Was going to ask :) I think I will take a closer look tomorrow. Why is it marking some class methods as static? |
Is clang-format doing that? Or are you asking about the earlier clang-tidy commits? |
clang-tidy does sometimes recommend a method be static - I think I only made that change once though - I'll take a closer look in case that was a bad idea. |
I think some things from clang-tidy are still here like, adding override for example. |
The last two commits have no clang-tidy fixes. The previous ones do, with the exception of 'Fix indentation project-wide'. |
Do you want me to make a pull request with only clang-format changes, and a different one for clang-tidy changes? |
Actually I like that idea. I will do that tomorrow - I have math homework to do right now. |
Closing this. #18 runs clang-format for the whole project. If that gets merged, I'll rebase these changes on top of those which should make everything cleaner and easier to follow. |
* Evaluate metrics and keep the best schedule. * Add extra temp debug printouts. * Add more simple cost function.
Warning! This branch has a huge number of changes because I fixed the indentation on every source file in the project. Basically anyone who's working on anything right now is going to have trouble merging after this commit.
#9