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

[clangd] Add CodeAction to swap operands to binary operators #78998

Closed
torshepherd opened this issue Jan 22, 2024 · 1 comment · Fixed by #78999
Closed

[clangd] Add CodeAction to swap operands to binary operators #78998

torshepherd opened this issue Jan 22, 2024 · 1 comment · Fixed by #78999
Labels
clangd enhancement Improving things as opposed to bug fixing, e.g. new or missing feature

Comments

@torshepherd
Copy link
Contributor

Title. Turn:

if (p == nullptr) ...
if (x <= 5) ...

into

if (nullptr == p) ...
if (5 >= x) ...
@EugeneZelenko EugeneZelenko added clangd enhancement Improving things as opposed to bug fixing, e.g. new or missing feature and removed new issue labels Jan 22, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Jan 22, 2024

@llvm/issue-subscribers-clangd

Author: Tor Shepherd (torshepherd)

Title. Turn:
if (p == nullptr) ...
if (x &lt;= 5) ...

into

if (nullptr == p) ...
if (5 &gt;= x) ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clangd enhancement Improving things as opposed to bug fixing, e.g. new or missing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants