Skip to content

Compile error building against clang 22 #145

Description

@PhilipDeegan
/usr/include/clang/AST/TypeNodes.inc:50:1: error: too many arguments to function call, expected single argument 'TL', have 2 arguments
   50 | TYPE(FunctionProto, FunctionType)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/clang/AST/TypeLocNodes.def:32:27: note: expanded from macro 'TYPE'
   32 | #define TYPE(Class, Base) UNQUAL_TYPELOC(Class, Base##Loc)
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/clang/AST/TypeLocNodes.def:24:39: note: expanded from macro 'UNQUAL_TYPELOC'
   24 | #  define UNQUAL_TYPELOC(Class, Base) TYPELOC(Class, Base)
      |                                       ^~~~~~~~~~~~~~~~~~~~
/usr/include/clang/AST/RecursiveASTVisitor.h:736:50: note: expanded from macro 'TYPELOC'
  735 |     return getDerived().Traverse##CLASS##TypeLoc(TL.castAs<CLASS##TypeLoc>(),  \
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  736 |                                                  TraverseQualifier);
      |                                                  ^~~~~~~~~~~~~~~~~
/home/deegan/git/MetaCG/cgcollector/lib/src/AliasAnalysis.cpp:664:31: note: in instantiation of member function 'clang::RecursiveASTVisitor<implementation::ASTInformationExtractor>::TraverseTypeLoc' requested here
  664 |   return RecursiveASTVisitor::TraverseTypeLoc(TL);
      |                               ^
/home/deegan/git/MetaCG/cgcollector/lib/src/AliasAnalysis.cpp:991:31: note: 'TraverseFunctionProtoTypeLoc' declared here
  991 | bool ASTInformationExtractor::TraverseFunctionProtoTypeLoc(clang::FunctionProtoTypeLoc TL) {
      |                               ^                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings and 2 errors generated.
make[2]: *** [cgcollector/lib/CMakeFiles/collector.dir/build.make:110: cgcollector/lib/CMakeFiles/collector.dir/src/AliasAnalysis.cpp.o] Error 1

╰─$ clang -v
clang version 22.1.6 (Fedora 22.1.6-1.fc44)
Target: x86_64-redhat-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Configuration file: /etc/clang/x86_64-redhat-linux-gnu-clang.cfg
System configuration file directory: /etc/clang/
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/16
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/16
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
Found HIP installation: /usr, version 7.1.52802

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions