[llvm] [LLVM][ADT] Deprecate `make_scope_exit` in favour of CTAD (PR #174109)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 31 13:42:12 PST 2025
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
The build failed before running any tests. Click on a failure below to see the details.
<details>
<summary>lib/Support/CMakeFiles/LLVMSupport.dir/Parallel.cpp.o</summary>
```
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/Parallel.cpp.o
sccache /opt/llvm/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Support -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/../third-party/siphash/include -gmlt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Werror=global-constructors -O3 -DNDEBUG -std=c++17 -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/Parallel.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/Parallel.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/Parallel.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Parallel.cpp
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Parallel.cpp:155:35: error: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Parallel.cpp:156:13)>' is deprecated: Prefer calling the constructor of llvm::scope_exit directly. [-Werror,-Wdeprecated-declarations]
155 | auto SlotReleaser = llvm::make_scope_exit(
| ^~~~~~~~~~~~~~~
| scope_exit
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/ScopeExit.h:56:1: note: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Parallel.cpp:156:13)>' has been explicitly marked deprecated here
56 | LLVM_DEPRECATED("Prefer calling the constructor of llvm::scope_exit directly.",
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Compiler.h:250:50: note: expanded from macro 'LLVM_DEPRECATED'
250 | #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX)))
| ^
1 error generated.
```
</details>
<details>
<summary>lib/Support/CMakeFiles/LLVMSupport.dir/Threading.cpp.o</summary>
```
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/Threading.cpp.o
sccache /opt/llvm/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Support -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/../third-party/siphash/include -gmlt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Werror=global-constructors -O3 -DNDEBUG -std=c++17 -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/Threading.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/Threading.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/Threading.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Threading.cpp
In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Threading.cpp:72:
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Threading.inc:85:26: error: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Threading.inc:85:42)>' is deprecated: Prefer calling the constructor of llvm::scope_exit directly. [-Werror,-Wdeprecated-declarations]
85 | auto AttrGuard = llvm::make_scope_exit([&] {
| ^~~~~~~~~~~~~~~
| scope_exit
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/ScopeExit.h:56:1: note: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Unix/Threading.inc:85:42)>' has been explicitly marked deprecated here
56 | LLVM_DEPRECATED("Prefer calling the constructor of llvm::scope_exit directly.",
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Compiler.h:250:50: note: expanded from macro 'LLVM_DEPRECATED'
250 | #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX)))
| ^
1 error generated.
```
</details>
<details>
<summary>lib/Support/CMakeFiles/LLVMSupport.dir/VirtualOutputBackends.cpp.o</summary>
```
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/VirtualOutputBackends.cpp.o
sccache /opt/llvm/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Support -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/../third-party/siphash/include -gmlt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Werror=global-constructors -O3 -DNDEBUG -std=c++17 -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/VirtualOutputBackends.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/VirtualOutputBackends.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/VirtualOutputBackends.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/VirtualOutputBackends.cpp
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/VirtualOutputBackends.cpp:476:32: error: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/VirtualOutputBackends.cpp:476:48)>' is deprecated: Prefer calling the constructor of llvm::scope_exit directly. [-Werror,-Wdeprecated-declarations]
476 | auto RemoveDiscardOnSignal = make_scope_exit([&]() {
| ^~~~~~~~~~~~~~~
| scope_exit
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/ScopeExit.h:56:1: note: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/VirtualOutputBackends.cpp:476:48)>' has been explicitly marked deprecated here
56 | LLVM_DEPRECATED("Prefer calling the constructor of llvm::scope_exit directly.",
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Compiler.h:250:50: note: expanded from macro 'LLVM_DEPRECATED'
250 | #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX)))
| ^
1 error generated.
```
</details>
<details>
<summary>lib/Support/CMakeFiles/LLVMSupport.dir/ThreadPool.cpp.o</summary>
```
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/ThreadPool.cpp.o
sccache /opt/llvm/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Support -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/../third-party/siphash/include -gmlt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Werror=global-constructors -O3 -DNDEBUG -std=c++17 -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/ThreadPool.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/ThreadPool.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/ThreadPool.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/ThreadPool.cpp
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/ThreadPool.cpp:193:9: error: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/ThreadPool.cpp:193:25)>' is deprecated: Prefer calling the constructor of llvm::scope_exit directly. [-Werror,-Wdeprecated-declarations]
193 | make_scope_exit([&] { TheJobserver->release(std::move(Slot)); });
| ^~~~~~~~~~~~~~~
| scope_exit
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/ScopeExit.h:56:1: note: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/ThreadPool.cpp:193:25)>' has been explicitly marked deprecated here
56 | LLVM_DEPRECATED("Prefer calling the constructor of llvm::scope_exit directly.",
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Compiler.h:250:50: note: expanded from macro 'LLVM_DEPRECATED'
250 | #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX)))
| ^
1 error generated.
```
</details>
<details>
<summary>lib/Support/CMakeFiles/LLVMSupport.dir/Path.cpp.o</summary>
```
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/Path.cpp.o
sccache /opt/llvm/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/Support -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/../third-party/siphash/include -gmlt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Werror=global-constructors -O3 -DNDEBUG -std=c++17 -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/Path.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/Path.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/Path.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Path.cpp
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Path.cpp:1199:25: error: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Path.cpp:1199:41)>' is deprecated: Prefer calling the constructor of llvm::scope_exit directly. [-Werror,-Wdeprecated-declarations]
1199 | auto TruncateOnExit = make_scope_exit([&]() { Buffer.truncate(Size); });
| ^~~~~~~~~~~~~~~
| scope_exit
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/ScopeExit.h:56:1: note: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/Support/Path.cpp:1199:41)>' has been explicitly marked deprecated here
56 | LLVM_DEPRECATED("Prefer calling the constructor of llvm::scope_exit directly.",
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Compiler.h:250:50: note: expanded from macro 'LLVM_DEPRECATED'
250 | #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX)))
| ^
1 error generated.
```
</details>
<details>
<summary>lib/CAS/CMakeFiles/LLVMCAS.dir/UnifiedOnDiskCache.cpp.o</summary>
```
FAILED: lib/CAS/CMakeFiles/LLVMCAS.dir/UnifiedOnDiskCache.cpp.o
sccache /opt/llvm/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/CAS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -gmlt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/CAS/CMakeFiles/LLVMCAS.dir/UnifiedOnDiskCache.cpp.o -MF lib/CAS/CMakeFiles/LLVMCAS.dir/UnifiedOnDiskCache.cpp.o.d -o lib/CAS/CMakeFiles/LLVMCAS.dir/UnifiedOnDiskCache.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/UnifiedOnDiskCache.cpp
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/UnifiedOnDiskCache.cpp:287:20: error: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/UnifiedOnDiskCache.cpp:287:36)>' is deprecated: Prefer calling the constructor of llvm::scope_exit directly. [-Werror,-Wdeprecated-declarations]
287 | auto CloseFile = make_scope_exit([&]() { sys::fs::closeFile(File); });
| ^~~~~~~~~~~~~~~
| scope_exit
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/ScopeExit.h:56:1: note: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/UnifiedOnDiskCache.cpp:287:36)>' has been explicitly marked deprecated here
56 | LLVM_DEPRECATED("Prefer calling the constructor of llvm::scope_exit directly.",
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Compiler.h:250:50: note: expanded from macro 'LLVM_DEPRECATED'
250 | #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX)))
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/UnifiedOnDiskCache.cpp:291:19: error: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/UnifiedOnDiskCache.cpp:291:35)>' is deprecated: Prefer calling the constructor of llvm::scope_exit directly. [-Werror,-Wdeprecated-declarations]
291 | auto UnlockFD = make_scope_exit([&]() { unlockFileThreadSafe(FD); });
| ^~~~~~~~~~~~~~~
| scope_exit
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/ScopeExit.h:56:1: note: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/UnifiedOnDiskCache.cpp:291:35)>' has been explicitly marked deprecated here
56 | LLVM_DEPRECATED("Prefer calling the constructor of llvm::scope_exit directly.",
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Compiler.h:250:50: note: expanded from macro 'LLVM_DEPRECATED'
250 | #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX)))
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/UnifiedOnDiskCache.cpp:335:22: error: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/UnifiedOnDiskCache.cpp:335:38)>' is deprecated: Prefer calling the constructor of llvm::scope_exit directly. [-Werror,-Wdeprecated-declarations]
335 | auto CloseLock = make_scope_exit([&]() { sys::fs::closeFile(LockFile); });
| ^~~~~~~~~~~~~~~
| scope_exit
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/ScopeExit.h:56:1: note: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/UnifiedOnDiskCache.cpp:335:38)>' has been explicitly marked deprecated here
56 | LLVM_DEPRECATED("Prefer calling the constructor of llvm::scope_exit directly.",
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Compiler.h:250:50: note: expanded from macro 'LLVM_DEPRECATED'
250 | #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX)))
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/UnifiedOnDiskCache.cpp:343:21: error: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/UnifiedOnDiskCache.cpp:343:37)>' is deprecated: Prefer calling the constructor of llvm::scope_exit directly. [-Werror,-Wdeprecated-declarations]
343 | auto UnlockFD = make_scope_exit([&]() { unlockFileThreadSafe(LockFD); });
| ^~~~~~~~~~~~~~~
| scope_exit
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/ScopeExit.h:56:1: note: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/UnifiedOnDiskCache.cpp:343:37)>' has been explicitly marked deprecated here
56 | LLVM_DEPRECATED("Prefer calling the constructor of llvm::scope_exit directly.",
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Compiler.h:250:50: note: expanded from macro 'LLVM_DEPRECATED'
250 | #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX)))
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/UnifiedOnDiskCache.cpp:522:20: error: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/UnifiedOnDiskCache.cpp:522:36)>' is deprecated: Prefer calling the constructor of llvm::scope_exit directly. [-Werror,-Wdeprecated-declarations]
522 | auto CloseLock = make_scope_exit([&]() {
| ^~~~~~~~~~~~~~~
| scope_exit
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/ScopeExit.h:56:1: note: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/UnifiedOnDiskCache.cpp:522:36)>' has been explicitly marked deprecated here
56 | LLVM_DEPRECATED("Prefer calling the constructor of llvm::scope_exit directly.",
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Compiler.h:250:50: note: expanded from macro 'LLVM_DEPRECATED'
250 | #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX)))
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/UnifiedOnDiskCache.cpp:550:21: error: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/UnifiedOnDiskCache.cpp:550:37)>' is deprecated: Prefer calling the constructor of llvm::scope_exit directly. [-Werror,-Wdeprecated-declarations]
550 | auto UnlockFile = make_scope_exit([&]() { unlockFileThreadSafe(LockFD); });
| ^~~~~~~~~~~~~~~
| scope_exit
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/ScopeExit.h:56:1: note: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/UnifiedOnDiskCache.cpp:550:37)>' has been explicitly marked deprecated here
56 | LLVM_DEPRECATED("Prefer calling the constructor of llvm::scope_exit directly.",
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Compiler.h:250:50: note: expanded from macro 'LLVM_DEPRECATED'
250 | #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX)))
| ^
6 errors generated.
```
</details>
<details>
<summary>lib/CAS/CMakeFiles/LLVMCAS.dir/OnDiskGraphDB.cpp.o</summary>
```
FAILED: lib/CAS/CMakeFiles/LLVMCAS.dir/OnDiskGraphDB.cpp.o
sccache /opt/llvm/bin/clang++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GLIBCXX_USE_CXX11_ABI=1 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/CAS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS -I/home/gha/actions-runner/_work/llvm-project/llvm-project/build/include -I/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include -gmlt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -UNDEBUG -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/CAS/CMakeFiles/LLVMCAS.dir/OnDiskGraphDB.cpp.o -MF lib/CAS/CMakeFiles/LLVMCAS.dir/OnDiskGraphDB.cpp.o.d -o lib/CAS/CMakeFiles/LLVMCAS.dir/OnDiskGraphDB.cpp.o -c /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/OnDiskGraphDB.cpp
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/OnDiskGraphDB.cpp:1236:20: error: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/OnDiskGraphDB.cpp:1236:36)>' is deprecated: Prefer calling the constructor of llvm::scope_exit directly. [-Werror,-Wdeprecated-declarations]
1236 | auto CloseFile = make_scope_exit([&]() { sys::fs::closeFile(*File); });
| ^~~~~~~~~~~~~~~
| scope_exit
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/ADT/ScopeExit.h:56:1: note: 'make_scope_exit<(lambda at /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/lib/CAS/OnDiskGraphDB.cpp:1236:36)>' has been explicitly marked deprecated here
56 | LLVM_DEPRECATED("Prefer calling the constructor of llvm::scope_exit directly.",
| ^
/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/include/llvm/Support/Compiler.h:250:50: note: expanded from macro 'LLVM_DEPRECATED'
250 | #define LLVM_DEPRECATED(MSG, FIX) __attribute__((deprecated(MSG, FIX)))
| ^
1 error generated.
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/174109
More information about the llvm-commits
mailing list