systemc-clang icon indicating copy to clipboard operation
systemc-clang copied to clipboard

systemc-clang make project fails in src/matchers/FindTemplateTypes.cpp

Open KarimAlatrash opened this issue 1 year ago • 2 comments

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

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

KarimAlatrash avatar Sep 19 '22 17:09 KarimAlatrash

Currently investigating a workaround involving switching from clang-16.0.0 to clang13.0.0 and rebuilding the project

KarimAlatrash avatar Sep 19 '22 17:09 KarimAlatrash

Update: Using clang 13.0.0 fixes the issue

KarimAlatrash avatar Sep 19 '22 19:09 KarimAlatrash