-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Style: Begin integrating simple clangd fixes #103075
base: master
Are you sure you want to change the base?
Conversation
158cb1f
to
473d6a3
Compare
473d6a3
to
3e167e3
Compare
3e167e3
to
cebc140
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nice, I'm looking forward to saner includes.
All the include changes I understood look sane. I can't guarantee correctness for every single one, but to be honest, if it compiles (on all platforms), and is less broad, it's good. Forward declare instead of include is especially appreciated.
Just one concern about the extern "C"
change.
cebc140
to
11cc8a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
core/string/ustring.cpp
Outdated
@@ -39,7 +39,7 @@ | |||
#include "core/string/translation_server.h" | |||
#include "core/string/ucaps.h" | |||
#include "core/variant/variant.h" | |||
#include "core/version_generated.gen.h" | |||
#include "core/version.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not strongly opposed to it, but why that change? The only macro used is from version_generated.gen.h
so it's more specific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thinking was the export
pragma in version.h
makes it so that file is "exposing" the generated file, so it can be used in its place similar to using typedef.h
instead of specific std
headers. That's not as easily conveyed though, so I'm fine reverting back to the generated file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it's not a bad idea, and the cost on compilation time should be similar either way.
As long as we keep version_hash.gen.h
separate (which changes for every commit, and causes quite a bit of CI churn as we can't fully reuse the cache), it should be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall.
11cc8a4
to
f09ee01
Compare
.clangd
fixes #100918In contrast to the above PR, this aims to focus almost exclusively on basic header-related changes identified via clangd. So while a similar amount of files were touched, the actual functionality should be effectively identical & help address our header include issues. The only two non-header changes were replacing
_DefaultComparator
withComparator
(dependant files can now includecore/typedefs.h
instead ofcore/templates/sort_array.h
) & replacing__aligned
with the nativealignas
(fits the redundancy-removal theme).