Skip to content

Commit 069456d

Browse files
jsjiclaude
andauthored
[Clang] Fix -Wctad-maybe-unsupported error in clang-linker-wrapper (#22466)
Provide explicit template argument to std::scoped_lock instead of relying on class template argument deduction, which GCC 7.5's libstdc++ does not supply a deduction guide for. This matches the existing usage elsewhere in the same file and fixes the -Werror build break. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 6225827 commit 069456d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2430,7 +2430,7 @@ linkAndWrapDeviceFiles(ArrayRef<SmallVector<OffloadFile>> LinkerInputFiles,
24302430

24312431
auto AppendImageToWrapperOutput = [&WrappedOutput,
24322432
&ImageMtx](StringRef ImagePath) {
2433-
std::scoped_lock Guard(ImageMtx);
2433+
std::scoped_lock<decltype(ImageMtx)> Guard(ImageMtx);
24342434
WrappedOutput.push_back(ImagePath);
24352435
};
24362436

0 commit comments

Comments
 (0)