systemc-clang
systemc-clang copied to clipboard
systemc-clang make project fails in src/matchers/FindTemplateTypes.cpp
Description
When following installation instructions here from scratch, running make
in the system-clang-build folder throws the following error:
/Users/karim/Developer/SystemCVerilog/systemc-clang/src/matchers/FindTemplateTypes.cpp:103:40: error: cannot initialize a parameter of type 'clang::TemplateName::Qualified' with an rvalue of type 'int'
template_name.print(sstream, Policy, 0);
^
/Users/karim/Developer/SystemCVerilog/llvm-project/build/../clang/include/clang/AST/TemplateName.h:335:24: note: passing argument to parameter 'Qual' here
Qualified Qual = Qualified::AsWritten) const;
^
1 error generated.
make[2]: *** [src/matchers/CMakeFiles/matchers.dir/FindTemplateTypes.cpp.o] Error 1
make[1]: *** [src/matchers/CMakeFiles/matchers.dir/all] Error 2
make: *** [all] Error 2
Reproducing the bug
- Install latest llvm-project from github following instructions here: llvm install instructions
- Install latest systemC from github using CMake instructions found here: systemc install instructions
- Follow installation steps found here: systemc-clang install instructions
- Upon running make, you should observe the error above.
Versions
- systemc-clang: Latest commit on master found here
- CXX compiler: clang-16.0.0git
- CXX flags: N/A
- SystemC: Latest commit on master found here which is at least 2.3.4
- Operating System: macOS Monterey, M1 Pro chip (ARM64 architecture)
Expected behaviour
The project make
command should compile the project without errors.
Actual behaviour
The project make
command stops at the error shown above
Currently investigating a workaround involving switching from clang-16.0.0 to clang13.0.0 and rebuilding the project
Update: Using clang 13.0.0 fixes the issue