Skip to content

[clangd] Fix RawStringLiteral being available to C and C++ versions prior to C++11 #69775

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

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

robozati
Copy link
Contributor

The RawStringLiteral code action runs both on C and C++ versions prior to C++11, where this feature is unavailable.

This patch adds a condition to check if the context is running a version equal or greater than C++11 and adds tests for failing in the wrong versions.

Fixes clangd/clangd#1795.

@robozati robozati changed the title Fix RawStringLiteral being available to C and C++ versions prior to C++11 [clangd] Fix RawStringLiteral being available to C and C++ versions prior to C++11 Oct 20, 2023
@llvmbot llvmbot added the clangd label Oct 20, 2023
@robozati
Copy link
Contributor Author

robozati commented Oct 20, 2023

Tests are randomly failing, let me get what is wrong.

EDIT: Actually, it was my laptop that is low on VRAM so clang would fail to compile sometimes. The tests were passing normally.
I’ll rebase the commits later because I’m using github’s private email, so the commits message aren’t an issue for now.

@robozati robozati marked this pull request as draft October 20, 2023 21:51
@robozati robozati marked this pull request as ready for review October 20, 2023 22:00
@robozati
Copy link
Contributor Author

@sam-mccall @kadircet Hello! I mentioned this PR in discord, but no one assigned themselves to review so I am pinging you.

@robozati robozati force-pushed the main branch 2 times, most recently from e8eb793 to d753701 Compare October 23, 2023 14:32
@vit9696
Copy link

vit9696 commented Oct 23, 2023

Confirmed working as it should. Thank you.

Copy link
Collaborator

@HighCommander4 HighCommander4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@HighCommander4 HighCommander4 merged commit 2f3d4f6 into llvm:main Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RawStringLiteral code action is available for pure C code
4 participants