[clang] Ast importer visitors (PR #138838)

Balázs Kéri via cfe-commits cfe-commits at lists.llvm.org
Fri May 16 02:04:57 PDT 2025


balazske wrote:

We should ensure that the code builds with `-DBUILD_SHARED_LIBS=ON` cmake option.  I think this is why I can not build it. I get this error:
```
/usr/bin/ld: tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/ASTImporter.cpp.o: in function `std::conditional<is_base_of_v<clang::Type, clang::concepts::Requirement>, llvm::Expected<clang::concepts::Requirement const*>, llvm::Expected<clang::concepts::Requirement*> >::type clang::ASTNodeImporter::import<clang::concepts::Requirement>(clang::concepts::Requirement*)':
llvm-project/clang/lib/AST/ASTImporter.cpp:1144: undefined reference to `clang::concepts::TypeRequirement::TypeRequirement(clang::TypeSourceInfo*)'
/usr/bin/ld: llvm-project/clang/lib/AST/ASTImporter.cpp:1207: undefined reference to `clang::concepts::ExprRequirement::ExprRequirement(clang::Expr*, bool, clang::SourceLocation, clang::concepts::ExprRequirement::ReturnTypeRequirement, clang::concepts::ExprRequirement::SatisfactionStatus, clang::ConceptSpecializationExpr*)'
/usr/bin/ld: llvm-project/clang/lib/AST/ASTImporter.cpp:1212: undefined reference to `clang::concepts::ExprRequirement::ExprRequirement(clang::concepts::Requirement::SubstitutionDiagnostic*, bool, clang::SourceLocation, clang::concepts::ExprRequirement::ReturnTypeRequirement)'
/usr/bin/ld: tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/ASTImporter.cpp.o: in function `void std::_Optional_base_impl<clang::concepts::ExprRequirement::ReturnTypeRequirement, std::_Optional_base<clang::concepts::ExprRequirement::ReturnTypeRequirement, true, true> >::_M_construct<clang::TemplateParameterList*&>(clang::TemplateParameterList*&)':
/usr/include/c++/9/optional:416: undefined reference to `clang::concepts::ExprRequirement::ReturnTypeRequirement::ReturnTypeRequirement(clang::TemplateParameterList*)'
collect2: error: ld returned 1 exit status
```

https://github.com/llvm/llvm-project/pull/138838


More information about the cfe-commits mailing list