Skip to content

[lldb] Fix misleading indentation in ABISysV_x86_64.cpp #2935

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

Conversation

kastiglione
Copy link

@kastiglione kastiglione commented May 7, 2021

Pre-emptive fix for eventual use of -Wmisleading-indentation.

See also #2928.

@kastiglione
Copy link
Author

@JDevlieghere where do you think the best place is for the cmake addition?

@jasonmolenda
Copy link

This is a good change, but should we be pushing for this on llvm github (upstream) instead?

@adrian-prantl
Copy link

This is clearly great, I just wonder if escalating this to -Werror is necessary or if we could get by with just enabling the warning. If we just enable the warning, it may be easier to add to the upstream repository, too. The upstream repository needs to be buildable by a much wider range of compilers and compiler versions, so just enabling the warning might be a more palatable change.

@kastiglione
Copy link
Author

kastiglione commented May 7, 2021

Upstream: My plan was to merge here first, and then try for upstream. But in that plan I was making an assumption: that we are willing to differ from upstream. But is that true? If people don't want this upstream, do we still want it here?

Warning vs error: I couldn't think of a case where we would want to allow broken indentation. If it's only a warning, we may not see it, and even if we do see it, would it be fixed? A typical build-script invocation has a lot of output, including warnings, so using a warning might be no different than having no warning.

@kastiglione
Copy link
Author

Re warning vs error: We may want to use LLVM_ENABLE_WERROR, but my personal opinion is there are plenty of warnings that are innocuous and shouldn't break the build.

@kastiglione
Copy link
Author

Let's start with warning, and if we find that's not strict enough we can make it an error as a second step.

@kastiglione
Copy link
Author

https://reviews.llvm.org/D102092

@kastiglione kastiglione changed the title [lldb][cmake] Emit build errors for misleading indentation [lldb] Fix misleading indentation in ABISysV_x86_64.cpp May 7, 2021
@kastiglione
Copy link
Author

This is now limited to a fix for -Wmisleading-indentation

@kastiglione
Copy link
Author

@swift-ci test

@kastiglione kastiglione merged commit 9ed0f40 into swift/release/5.5 May 10, 2021
@kastiglione kastiglione deleted the lldb-cmake-Emit-build-errors-for-misleading-indentation branch May 10, 2021 23:51
kastiglione added a commit that referenced this pull request May 10, 2021
Pre-emptive fix for [eventual use of](https://reviews.llvm.org/D102092) `-Wmisleading-indentation`.

See also #2928.

(cherry picked from #2935)
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.

3 participants