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

build: fix clang-tidy plugin build failure #6016

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

scarf005
Copy link
Member

Purpose of change (The Why)

/var/home/scarf/repo/cata/Cataclysm/tools/clang-tidy-plugin/TextStyleCheck.cpp:93:59: error: no member named 'equals' in 'llvm::StringRef'
   92 |         } else if( StringRef( SrcMgr.getPresumedLoc( SrcMgr.getSpellingLoc(
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   93 |                                   loc ) ).getFilename() ).equals( "<scratch space>" ) ) {
      |                                   ~~~~~~~~~~~~~~~~~~~~~~~ ^
1 error generated.
ninja: build stopped: cannot make progress due to previous errors.
$ llvm-config --version
19.1.5

equals seems to be removed in recent LLVM (at least since 19) and thus it's not possible to build clang-tidy plugin.

Describe the solution (The How)

use equals_insensitive. see https://llvm.org/doxygen/classllvm_1_1StringRef.html#ae46058c90a3c703357331a6501b32f1c for details.

Testing

builds on local machine.

Additional context

for some reason LLVM doxygen isn't versioned so i can't find out which exact version removed equals.

Checklist

Mandatory

@chaosvolt chaosvolt merged commit a6e8d1f into cataclysmbnteam:main Jan 30, 2025
9 checks passed
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.

2 participants