-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Labels
Description
Building with CMAKE_CXX_STANDARD=20 failed but with CMAKE_CXX_STANDARD=17 success
$ gcc --version
gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4)
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ uname -a
Linux be52cec1e796 5.15.49-linuxkit #1 SMP Tue Sep 13 07:51:46 UTC 2022 x86_64 x86_64 x86_64 GNU/LinuxCmake configure:
cmake ../llvm -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=20Error message:
/llvm-project/llvm/lib/Transforms/IPO/AttributorAttributes.cpp:3499:38: error: expected unqualified-id before ‘const’
3499 | CachedReachabilityAA<BaseTy, ToTy>(const IRPosition &IRP, Attributor &A)
| ^~~~~
/llvm-project/llvm/lib/Transforms/IPO/AttributorAttributes.cpp:3499:38: error: expected ‘)’ before ‘const’
3499 | CachedReachabilityAA<BaseTy, ToTy>(const IRPosition &IRP, Attributor &A)
| ~^~~~~
| )
/llvm-project/llvm/lib/Transforms/IPO/AttributorAttributes.cpp: In constructor ‘{anonymous}::AAIntraFnReachabilityFunction::AAIntraFnReachabilityFunction(const llvm::IRPosition&, llvm::Attributor&)’:
/llvm-project/llvm/lib/Transforms/IPO/AttributorAttributes.cpp:3604:20: error: no matching function for call to ‘{anonymous}::CachedReachabilityAA<llvm::AAIntraFnReachability, llvm::Instruction>::CachedReachabilityAA(const llvm::IRPosition&, llvm::Attributor&)’
3604 | : Base(IRP, A) {}
| ^
/llvm-project/llvm/lib/Transforms/IPO/AttributorAttributes.cpp:3496:8: note: candidate: ‘{anonymous}::CachedReachabilityAA<llvm::AAIntraFnReachability, llvm::Instruction>::CachedReachabilityAA(const {anonymous}::CachedReachabilityAA<llvm::AAIntraFnReachability, llvm::Instruction>&)’
3496 | struct CachedReachabilityAA : public BaseTy {
| ^~~~~~~~~~~~~~~~~~~~
/llvm-project/llvm/lib/Transforms/IPO/AttributorAttributes.cpp:3496:8: note: candidate expects 1 argument, 2 provided
/llvm-project/llvm/lib/Transforms/IPO/AttributorAttributes.cpp:3496:8: note: candidate: ‘{anonymous}::CachedReachabilityAA<llvm::AAIntraFnReachability, llvm::Instruction>::CachedReachabilityAA({anonymous}::CachedReachabilityAA<llvm::AAIntraFnReachability, llvm::Instruction>&&)’
/llvm-project/llvm/lib/Transforms/IPO/AttributorAttributes.cpp:3496:8: note: candidate expects 1 argument, 2 provided
/llvm-project/llvm/lib/Transforms/IPO/AttributorAttributes.cpp: In lambda function:
/llvm-project/llvm/lib/Transforms/IPO/AttributorAttributes.cpp:7594:9: warning: implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20 [-Wdeprecated]
7594 | [=](const Attributor::ArgumentReplacementInfo &ARI,
| ^
/llvm-project/llvm/lib/Transforms/IPO/AttributorAttributes.cpp:7594:9: note: add explicit ‘this’ or ‘*this’ capture
/llvm-project/llvm/lib/Transforms/IPO/AttributorAttributes.cpp: In lambda function:
/llvm-project/llvm/lib/Transforms/IPO/AttributorAttributes.cpp:7618:9: warning: implicit capture of ‘this’ via ‘[=]’ is deprecated in C++20 [-Wdeprecated]
7618 | [=, &AlignAA](const Attributor::ArgumentReplacementInfo &ARI,
| ^
/llvm-project/llvm/lib/Transforms/IPO/AttributorAttributes.cpp:7618:9: note: add explicit ‘this’ or ‘*this’ capture
/llvm-project/llvm/lib/Transforms/IPO/AttributorAttributes.cpp: In constructor ‘{anonymous}::AAInterFnReachabilityFunction::AAInterFnReachabilityFunction(const llvm::IRPosition&, llvm::Attributor&)’:
/llvm-project/llvm/lib/Transforms/IPO/AttributorAttributes.cpp:10543:69: error: no matching function for call to ‘{anonymous}::CachedReachabilityAA<llvm::AAInterFnReachability, llvm::Function>::CachedReachabilityAA(const llvm::IRPosition&, llvm::Attributor&)’
10543 | : CachedReachabilityAA<AAInterFnReachability, Function>(IRP, A) {}
| ^
/llvm-project/llvm/lib/Transforms/IPO/AttributorAttributes.cpp:3496:8: note: candidate: ‘{anonymous}::CachedReachabilityAA<llvm::AAInterFnReachability, llvm::Function>::CachedReachabilityAA(const {anonymous}::CachedReachabilityAA<llvm::AAInterFnReachability, llvm::Function>&)’
3496 | struct CachedReachabilityAA : public BaseTy {
| ^~~~~~~~~~~~~~~~~~~~
/llvm-project/llvm/lib/Transforms/IPO/AttributorAttributes.cpp:3496:8: note: candidate expects 1 argument, 2 provided
/llvm-project/llvm/lib/Transforms/IPO/AttributorAttributes.cpp:3496:8: note: candidate: ‘{anonymous}::CachedReachabilityAA<llvm::AAInterFnReachability, llvm::Function>::CachedReachabilityAA({anonymous}::CachedReachabilityAA<llvm::AAInterFnReachability, llvm::Function>&&)’
/llvm-project/llvm/lib/Transforms/IPO/AttributorAttributes.cpp:3496:8: note: candidate expects 1 argument, 2 provided
[ 65%] Building CXX object lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/DeadArgumentElimination.cpp.o
make[2]: *** [lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/build.make:132: lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/AttributorAttributes.cpp.o] Error 1