Conversation
Load clang-dumper assets from the v16.0.5_3 release manifest and remove the legacy archive resource map. Update Clang 18 enum values, parser tolerance, bundled include/CUDA handling, and JS expectations needed by the new dumper.
Use entrypoints.txt from extracted clang-dumper include archives as the ordered system include roots. Throw when entrypoints.txt is missing instead of inferring roots from archive folder names.
Allow parser tests to select a local dumper without disturbing release cache assets. Restore strict resolution of referenced nodes so incomplete dumper output fails at its source.
Share the system-header threshold spelling between Clava's tool and plugin invocation paths.
Treat absolute tag-file values as build directories, use their local tool or plugin without release downloads or checksum validation, and force system-provided headers. Remove the superseded executable override and cover source parsing and local tool selection.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Clava’s “clang-dumper” integration (v3), including new resource/asset handling via a manifest, expanded enum/type support aligned with newer Clang outputs, and additional source-location regression tests across Java and JS APIs.
Changes:
- Replace legacy clang-dumper resource/version handling with a manifest-driven download/cache flow (including integrity checks and stale-cache cleanup).
- Update multiple AST enums/type parsers (e.g., elaborated keywords, unary transform types, calling conventions, attributes, string kinds, language flags) to match newer dumper output.
- Add new source-location tests and CUDA-related include/wrapper handling improvements.
Reviewed changes
Copilot reviewed 36 out of 37 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ClavaWeaver/src/pt/up/fe/specs/clava/weaver/importable/AstFactory.java | Updates elaborated-type keyword usage to new enum naming. |
| ClavaWeaver/resources/clava/test/weaver/cpp/results/TypeTemplate.js.txt | Adjusts expected test output formatting/line numbering. |
| ClavaAst/src/pt/up/fe/specs/clava/ast/type/UnaryTransformType.java | Makes underlying transform type optional and updates API accordingly. |
| ClavaAst/src/pt/up/fe/specs/clava/ast/type/enums/UnaryTransformTypeKind.java | Expands unary transform kind coverage. |
| ClavaAst/src/pt/up/fe/specs/clava/ast/type/enums/ElaboratedTypeKeyword.java | Renames/normalizes elaborated type keywords and code generation behavior. |
| ClavaAst/src/pt/up/fe/specs/clava/ast/type/enums/CallingConvention.java | Adds additional calling convention(s). |
| ClavaAst/src/pt/up/fe/specs/clava/ast/type/ElaboratedType.java | Minor formatting cleanup in code generation path. |
| ClavaAst/src/pt/up/fe/specs/clava/ast/extra/data/Language.java | Adds a C++26 feature flag. |
| ClavaAst/src/pt/up/fe/specs/clava/ast/expr/StringLiteral.java | Extends byte-to-string decoding to cover unevaluated string kind. |
| ClavaAst/src/pt/up/fe/specs/clava/ast/expr/enums/StringKind.java | Adds UNEVALUATED string kind and prefix behavior. |
| ClavaAst/src/pt/up/fe/specs/clava/ast/decl/enums/Linkage.java | Reworks linkage enum values/names to new scheme. |
| ClavaAst/src/pt/up/fe/specs/clava/ast/decl/enums/InitializationStyle.java | Updates initialization styles to match current Clang behavior. |
| ClavaAst/src/pt/up/fe/specs/clava/ast/attr/enums/AttributeKind.java | Expands attribute coverage and adjusts ordering. |
| Clava-JS/code/sideEffects.ts | Changes clang-dumper cache directory naming/location. |
| Clava-JS/api/SourceLocations.test.ts | Adds JS-level tests for real source coordinates vs macro expansions. |
| Clava-JS/api/Joinpoints.ts | Updates JS API enum-string constants (storage class, relation). |
| ClangAstParser/test/pt/up/fe/specs/clang/parser/tests/SourceLocationsTest.java | Adds JUnit tests validating file/line/column source ranges. |
| ClangAstParser/test/pt/up/fe/specs/clang/ClangResourcesTest.java | Adds tests for dumper source parsing, cache cleanup, and CUDA includes availability. |
| ClangAstParser/test-resources/cxx/source_locations.cpp | Adds C++ test input for macro/template source location coverage. |
| ClangAstParser/src/pt/up/fe/specs/clang/SupportedPlatform.java | Removes Linux ARM hard-rejection to allow resource selection by arch. |
| ClangAstParser/src/pt/up/fe/specs/clang/parsers/LanguageParser.java | Parses the new C++26 language flag. |
| ClangAstParser/src/pt/up/fe/specs/clang/parsers/data/TypeDataParser.java | Adjusts unary transform parsing to set optional underlying type. |
| ClangAstParser/src/pt/up/fe/specs/clang/parsers/data/ExprDataParser.java | Updates character-literal kind parsing to enum-by-name. |
| ClangAstParser/src/pt/up/fe/specs/clang/parsers/ClavaNodes.java | Tightens node resolution and optional/nullable queueing behavior. |
| ClangAstParser/src/pt/up/fe/specs/clang/parsers/ClavaNodeParser.java | Removes dead/commented code and minor message formatting changes. |
| ClangAstParser/src/pt/up/fe/specs/clang/dumper/ClangAstParser.java | Minor formatting cleanup in TU parsing. |
| ClangAstParser/src/pt/up/fe/specs/clang/dumper/ClangAstDumper.java | Updates dumper CLI args, CUDA mode handling, and bundled include behavior. |
| ClangAstParser/src/pt/up/fe/specs/clang/codeparser/ParallelCodeParser.java | Removes explicit dumper version handling and adapts to new resource API. |
| ClangAstParser/src/pt/up/fe/specs/clang/codeparser/CodeParser.java | Updates dumper cache folder semantics/labeling. |
| ClangAstParser/src/pt/up/fe/specs/clang/ClangResources.java | Major rewrite: manifest-based asset download, cache validation, locking, and stale cleanup. |
| ClangAstParser/src/pt/up/fe/specs/clang/ClangAstWebResource.java | Replaces old interface constants with manifest/tag-based resource model. |
| ClangAstParser/src/pt/up/fe/specs/clang/ClangAstResource.java | Adds CUDA compatibility resource and removes legacy commented paths. |
| ClangAstParser/src/pt/up/fe/specs/clang/ClangAstKeys.java | Removes old clang-dumper version key/flag parsing. |
| ClangAstParser/src/pt/up/fe/specs/clang/ClangAstFileResource.java | Removes legacy file-resource enum. |
| ClangAstParser/resources/clangast/cuda_compatibility.h | Adds CUDA compatibility header to support built-in CUDA flow. |
| ClangAstParser/clang-dumper-release.tag | Adds embedded release tag file used to select dumper source. |
| ClangAstParser/build.gradle | Adds Gson dependency and includes release tag in processed resources. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add support for Clang's CXXParenListInitExpr node and preserve the original parenthesized argument list during code generation. Add an integration test covering aggregate initialization under C++20.
Key the in-process lock by the shared release cache lock file so concurrent libc and CUDA configurations cannot acquire different JVM locks for the same cache folder.
Store per-version cache locks beside the version directory so cleanup can delete the directory while holding the lock on Windows, Linux, and macOS. Update the cache cleanup test to use the shared lock-path helper.
Discover a system CUDA toolkit from portable environment, PATH, and platform-specific locations when bundled headers are unavailable. Continue with a single warning when no toolkit is found instead of rejecting local builds.
Coordinate cache initialization and stale cleanup with a temporary directory claim that is removed on release. Keep the claim outside version folders for Windows deletion and recover claims left by terminated processes.
Write the shared CUDA compatibility resource to a unique temporary file and install it with an atomic move, preventing concurrent Clava instances from reading a partial header.
Restore callinit and listinit as explicit enum values because the generated TypeScript API exposes raw strings without an enum conversion.
Add same-JVM, cross-JVM, multi-version, crash-recovery, stale-cleanup, and real release initialization coverage for the clang-dumper cache. Keep red diagnostic tests for reclaimed-lock release and cached last-used updates bypassing the cache lock.
Add a cross-JVM diagnostic proving stale cleanup can remove an executable still referenced by the in-process ClangFiles cache.
Add a C++26 round-trip regression fixture covering ordinary text, simple escapes, and UCNs. Preserve Clang's source spelling for unevaluated strings because their byte payload cannot be safely re-emitted with numeric escapes, and recognize the c++2c standard used by the test.
Keep Clangs validated source spelling for UNEVALUATED literals so adjacent tokens and source line breaks survive code generation. Update the dependent-scope golden accordingly.
Use Clava's historical cudalib.zip with standard --cuda-path handling and remove the compatibility-header workaround.
Select Clava's historical CUDA archive whenever the built-in CUDA option is requested, including configurations with empty bundled libc includes.
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.