-
Notifications
You must be signed in to change notification settings - Fork 88
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
fix constructor order, friend class, inconsistent function, inconsistent class/struct #1725
Open
yhmtsai
wants to merge
6
commits into
develop
Choose a base branch
from
clang_cl
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ginkgo-bot
added
reg:testing
This is related to testing.
reg:ci-cd
This is related to the continuous integration system.
reg:benchmarking
This is related to benchmarking.
type:solver
This is related to the solvers
type:preconditioner
This is related to the preconditioners
type:matrix-format
This is related to the Matrix formats
type:reordering
This is related to the matrix(LinOp) reordering
type:multigrid
This is related to multigrid
type:stopping-criteria
This is related to the stopping criteria
mod:all
This touches all Ginkgo modules.
labels
Nov 14, 2024
upsj
approved these changes
Nov 14, 2024
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.
LGTM! Great catch, I would have thought that -Wreorder
can catch some of these issues, and I must have missed the name mangling capturing parameter const-ness.
yhmtsai
force-pushed
the
clang_cl
branch
6 times, most recently
from
November 14, 2024 21:37
083b66d
to
9e53640
Compare
yhmtsai
added
1:ST:ready-for-review
This PR is ready for review
and removed
1:ST:WIP
This PR is a work in progress. Not ready for review.
labels
Nov 15, 2024
I found the const-ness issue by lucky. I do not have an idea that any tool can help detecting this situation. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
1:ST:ready-for-review
This PR is ready for review
mod:all
This touches all Ginkgo modules.
plat:windows
This is related to the Windows Operating system
reg:benchmarking
This is related to benchmarking.
reg:ci-cd
This is related to the continuous integration system.
reg:testing
This is related to testing.
type:matrix-format
This is related to the Matrix formats
type:multigrid
This is related to multigrid
type:preconditioner
This is related to the preconditioners
type:reordering
This is related to the matrix(LinOp) reordering
type:solver
This is related to the solvers
type:stopping-criteria
This is related to the stopping criteria
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
From #1675 , we can not use clang-cl on windows to build ginkgo (maybe only static build, not sure the shared build)
The reason is the inconsistence between the declaration and declaration of definition.
For example,
We declare
void func(int *a);
, which is seen by ginkgo_core. We also use it to instantiate the function.However, we implement it like
void func(int *const a) {...}
.The symbol in the library from clang-cl will use
void func(int *const a)
notvoid func(int *a)
.core only know
void func(int *a)
such that it can not find the symbol properly although theint* a
should be fit intoint* const a
More than that, I also fix the constructor order is different from the data member order, microsoft does not like the friend class without namespace not in the nearest namespace, and inconsistent class/struct.
also, add some tricks to avoid alais undeclared in the a structure which is in another tempalted structure.
It is mentioned in llvm/llvm-project#64996
we use
using .. = ..
in the nested struct as workaround here