SUMMARY 1.7 version does not compile with LLVM/clang-11.x STEPS TO REPRODUCE 1. set LLVM/clang-11.x as default compiler 2. try to compile clazy-1.7 3. observe error OBSERVED RESULT Full logs can be found here https://abf.openmandriva.org/build_lists/817596 [1/107] Building CXX object CMakeFiles/ClazyPlugin.dir/src/checks/manuallevel/tr-non-literal.cpp.o FAILED: CMakeFiles/ClazyPlugin.dir/src/checks/manuallevel/tr-non-literal.cpp.o /usr/bin/clang++ -DCLAZY_DISABLE_AST_MATCHERS -DClazyPlugin_EXPORTS -DHAVE_CLANG_CONFIG_H -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -I. -I../ -I../src -Os -fomit-frame-pointer -g1 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-all --param=ssp-buffer-size=4 -m64 -mtune=generic -std=c++11 -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -fno-exceptions -fno-rtti -fPIC -Os -fomit-frame-pointer -g1 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-all --param=ssp-buffer-size=4 -m64 -mtune=generic -MD -MT CMakeFiles/ClazyPlugin.dir/src/checks/manuallevel/tr-non-literal.cpp.o -MF CMakeFiles/ClazyPlugin.dir/src/checks/manuallevel/tr-non-literal.cpp.o.d -o CMakeFiles/ClazyPlugin.dir/src/checks/manuallevel/tr-non-literal.cpp.o -c ../src/checks/manuallevel/tr-non-literal.cpp In file included from ../src/checks/manuallevel/tr-non-literal.cpp:23: In file included from ../src/checks/manuallevel/tr-non-literal.h:26: In file included from ../src/checkbase.h:28: In file included from ../src/clazy_stl.h:26: In file included from /usr/include/clang/AST/Stmt.h:16: In file included from /usr/include/clang/AST/DeclGroup.h:16: In file included from /usr/include/llvm/Support/TrailingObjects.h:50: In file included from /usr/include/llvm/Support/Alignment.h:24: In file included from /usr/include/llvm/ADT/Optional.h:20: /usr/include/llvm/Support/type_traits.h:31:28: error: no template named 'remove_reference_t' in namespace 'std'; did you mean 'remove_reference'? using UnderlyingT = std::remove_reference_t<T>; ~~~~~^ /usr/bin/../lib64/gcc/x86_64-openmandriva-linux-gnu/10.2.0/../../../../include/c++/10.2.0/type_traits:1593:12: note: 'remove_reference' declared here struct remove_reference ^ EXPECTED RESULT No errors SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: OpenMandriva Lx Cooker (available in About System) KDE Plasma Version: 5.19.4 KDE Frameworks Version: 5.73 Qt Version: 5.15.0 ADDITIONAL INFORMATION
commit 1f2f7f47bc9a5bce6e3eaabbef8743f0617bc015 (HEAD -> master, origin/master) Author: Sergio Martins <smartins@kde.org> Date: Wed Oct 14 15:47:13 2020 +0100 Fix build with llvm-11
Hi, ive added your commit to clazy-1.8 build. Still same error: https://abf.openmandriva.org/build_lists/917634 /usr/include/llvm/Support/type_traits.h:31:28: error: no template named 'remove_reference_t' in namespace 'std'; did you mean 'remove_reference'? using UnderlyingT = std::remove_reference_t<T>; ~~~~~^ https://github.com/OpenMandrivaAssociation/clazy/commit/0a749bf7fd51cce3006737bba22a0fa5acd727a6
if you copy that compiler invocation line, but replace -std=c++11 with -std=c++14 , does it work ?
Sorry for the noise. After proper update to 1.8 version things are compiling without errors.