Conversation
Signed-off-by: Eloïse Brocas <ebrocas@quarkslab.com>
Signed-off-by: Eloïse Brocas <ebrocas@quarkslab.com>
Signed-off-by: Eloïse Brocas <ebrocas@quarkslab.com>
Signed-off-by: Eloïse Brocas <ebrocas@quarkslab.com>
The C/C++ indexer back-end (inherited from Sourcetrail) used several clang AST APIs that were removed or changed up to and including LLVM 19, so it no longer compiled once BUILD_CXX_LANGUAGE_PACKAGE was enabled. Port it to LLVM/Clang 19 (the default toolchain on Debian trixie): - ClangInvocationInfo: <llvm/Support/Host.h> moved to <llvm/TargetParser/Host.h>. - CxxDeclNameResolver: NamespaceDecl::getOriginalNamespace() removed; use the equivalent getCanonicalDecl(). - CxxAstVisitor: TemplateTypeParmDecl::getDefaultArgumentInfo() removed; the default argument is now a TemplateArgumentLoc, so use getDefaultArgument().getTypeSourceInfo() with a null guard. - CxxAstVisitor: ClassTemplateSpecializationDecl::getTypeAsWritten() removed; iterate getTemplateArgsAsWritten()->arguments() directly. - utilityClang: the TagTypeKind enumerators became an enum class (TTK_Struct -> TagTypeKind::Struct, etc.). - utilityClang / CanonicalFilePathCache / CxxDiagnosticConsumer / PreprocessorCallbacks: FileEntry::getName() was removed and the file name now lives on FileEntryRef. Thread FileEntryRef / OptionalFileEntryRef through getFileNameOfFileEntry() and its callers, resolving entries via SourceManager::getFileEntryRefForID(). The InclusionDirective PPCallbacks override is updated to the LLVM 19 signature (OptionalFileEntryRef plus the split SuggestedModule / ModuleImported parameters). The minimum supported LLVM/Clang version is now 19.
CxxAstVisitor::TraverseClassTemplateSpecializationDecl is a custom
replacement for the RecursiveASTVisitor traversal that intentionally
skips the specialization's own type loc. It did not traverse the
specialization's base specifiers, so the base class of an implicitly
instantiated template was only ever recorded from the primary template,
in its generic form (e.g. "VectorBase<T, N>").
The substituted base type ("VectorBase<float, 2>") is sugar that only
exists on the specialization decl. Traverse the specialization's base
specifiers (guarded by hasDefinition()) so the inheritance edge of an
implicit instantiation is recorded with its actual template arguments.
The vendored Catch v1 fatal-condition handler computes its alternate signal-stack size in a constexpr using MINSIGSTKSZ and declares the stack buffer with that size. Since glibc 2.34 MINSIGSTKSZ is no longer an integer constant expression, which breaks compilation of the test binary on current toolchains (e.g. Debian trixie): error: call to non-'constexpr' function 'long int sysconf(int)' error: size of array 'altStackMem' is not an integral constant-expression Make sigStackSize a runtime value and give altStackMem a fixed 32 KiB size (the value Catch already prefers; MINSIGSTKSZ is far smaller, so the chosen ss_size never exceeds the buffer).
- Add a case asserting that a type used as a template argument in an
explicit class template specialization ("class A<S>") is recorded as a
type use. This exercises the getTemplateArgsAsWritten() traversal added
during the LLVM 19 port.
- Update the expected inheritance edge of an implicit template
specialization to "VectorBase<float, 2U>": since LLVM/Clang 19 an
unsigned non-type template argument is pretty-printed canonically with
the "U" suffix. This case now passes thanks to the base-specifier
traversal fix.
Now that the C/C++ indexer builds against LLVM/Clang 19, ship it in the package: - rules: configure with -DBUILD_CXX_LANGUAGE_PACKAGE=ON and pin Clang_DIR / LLVM_DIR to the LLVM 19 toolchain for a deterministic build. - control: add llvm-19-dev, libclang-19-dev, libclang-cpp19-dev and clang-19 to Build-Depends; update the package description (C/C++ indexing is now available, Python indexing remains disabled). - lintian-overrides: the indexer copies Clang's builtin compiler headers into <sharedDataDir>/data/cxx/include at the fixed runtime path; note the resulting duplication of libclang-common-19-dev as intentional.
Signed-off-by: Eloïse Brocas <ebrocas@quarkslab.com>
Signed-off-by: Eloïse Brocas <ebrocas@quarkslab.com>
Bring the documentation in line with the current state of the project: * uniformity: rename remaining 'Sourcetrail' references to 'NumbatUI' across the docs pages, fix the broken download link in getting_started.md (it pointed at the upstream Sourcetrail releases). * installation: rewrite docs/installation.md around the three supported paths (Docker, manual build, native .deb) instead of the obsolete Sourcetrail binary installers; fix the data-folder locations. * info: bump C/C++ support to LLVM/Clang 19 (hard minimum), document that C/C++ indexing is built with -DBUILD_CXX_LANGUAGE_PACKAGE=ON and off by default, note Python indexing is disabled by design, and replace the dead CoatiSoftware tracker links with the NumbatUI ones.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.