chore: bump LLVM to 77e43ec1 (May 21, 2026)#1241
Open
gennaroprota wants to merge 3 commits into
Open
Conversation
✨ Highlights
🧾 Changes by Scope
🔝 Top Files
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1241 +/- ##
========================================
Coverage 83.16% 83.16%
========================================
Files 35 35
Lines 3658 3658
Branches 843 843
========================================
Hits 3042 3042
Misses 409 409
Partials 207 207
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
An automated preview of the documentation is available at https://1241.mrdocs.prtest2.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-07-03 14:05:52 UTC |
bafa3ea to
9ca11ea
Compare
The new pin includes llvm/llvm-project#198452, which attaches documentation comments to macro definitions. That is the prerequisite for reading them from Clang directly instead of scanning the source, as we were initially doing in PR cppalliance#1192. The pin was about six months behind, so this also adapts MrDocs to the Clang API changes across that range: - USRGeneration.h moved from clang/Index to clang/UnifiedSymbolResolution; the `clang::index` namespace and signatures are unchanged. - `clang::DiagnosticConsumer::finish()` was removed, so the collecting diagnostic consumer relies on the forwarded `EndSourceFile()` instead. - The driver option table moved to clang/Options/Options.h, with its enumerators now in `clang::options` and `getDriverOptTable()` in `clang`. - `cl::getRegisteredOptions()` now returns a `DenseMap`, so its entries expose `.second` instead of `getValue()`. - `SubstituteConstraintExpressionWithoutSatisfaction` was re-synced with Clang's current implementation. `getRawCommentForDeclNoCache`, the per-declaration comment lookup `getDocumentation` relied on, is no longer public. Its only public replacement, `getRawCommentForAnyRedecl`, follows the redeclaration chain and so cannot return a single declaration's own comment. `getDocumentation` keeps the per-declaration behavior by porting Clang's declaration-path comment search (`getLocsForCommentSearch` and `getRawCommentNoCacheImpl`) as file-local helpers. Parsing the newer libc++ also needs a new vcruntime_new.h stub and C++ guards so stdbool.h, stdalign.h, and threads.h stop redefining `bool`, `alignas`, and `thread_local`, which are keywords, not macros, in C++. The LLVM commit hash also feeds the CI cache key, so ci-matrix.yml and the test_cache_keys.py unit test that mirrors it are bumped to match; otherwise CI restores the previous libc++ install and builds the new one over it. The regenerated goldens change only because Clang's output drifted over the six months: constrained templates and destructors get different symbol IDs from USR generation, though their structure is identical (requires-clause, dtor-overloads), and a few declaration locations shifted by a line or column (auto, param-types, function-template).
9ca11ea to
28e4b46
Compare
The LLVM bump broke two sanitizer jobs, both stemming from the instrumented libc++ that the Clang ASan and MSan configurations build from the pinned sources: - Clang MSan failed to build it: the new libc++ needs a recent clang, and MSan had landed on clang 20. - Clang ASan built it, but then the libcxx.cpp test failed to parse it: libc++'s ASan container-check self-guard rejects a parse that does not enable the sanitizer. MSan genuinely needs an instrumented libc++ (it reports false positives on uninstrumented code), so it keeps building one, now on the latest Clang. ASan does not - it works against the normal libc++, as the Apple-Clang ASan job already does - so it no longer builds its own, which removes the libcxx.cpp conflict.
e5bac8a to
9c7fcf4
Compare
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.
The new pin includes llvm/llvm-project#198452, which attaches documentation comments to macro definitions. That is the prerequisite for reading them from Clang directly instead of scanning the source, as we were initially doing in PR #1192.
Changes
Third-party: bump LLVM to 77e43ec1 (Associate documentation comments with macro definitions llvm/llvm-project#198452).
CI: update the hardcoded LLVM hash in the cache key (ci-matrix.yml) and its mirror unit test (test_cache_keys.py) to match the new pin, so the key misses and LLVM builds fresh instead of restoring the old install.
Source: The pin was about six months behind, so this also adapts MrDocs to the Clang API changes across that range:
clang::indexnamespace and signatures are unchanged.clang::DiagnosticConsumer::finish()was removed, so the collecting diagnostic consumer relies on the forwardedEndSourceFile()instead.clang::optionsandgetDriverOptTable()inclang.cl::getRegisteredOptions()now returns aDenseMap, so its entries expose.secondinstead ofgetValue().SubstituteConstraintExpressionWithoutSatisfactionwas re-synced with Clang's current implementation.getRawCommentForDeclNoCache, the per-declaration comment lookupgetDocumentationrelied on, is no longer public. Its only public replacement,getRawCommentForAnyRedecl, follows the redeclaration chain and so cannot return a single declaration's own comment.getDocumentationkeeps the per-declaration behavior by porting Clang's declaration-path comment search (getLocsForCommentSearchandgetRawCommentNoCacheImpl) as file-local helpers.Parsing the newer libc++ also needs a new vcruntime_new.h stub and C++ guards so stdbool.h, stdalign.h, and threads.h stop redefining
bool,alignas, andthread_local, which are keywords, not macros, in C++.Golden tests: The regenerated goldens change only because Clang's output drifted over the six months: constrained templates and destructors get different symbol IDs from USR generation, though their structure is identical (requires-clause, dtor-overloads), and a few declaration locations shifted by a line or column (auto, param-types, function-template).
Testing
No new tests are added; this is a toolchain bump. The existing unit and golden suites already cover the affected behavior and run in CI on every build, and the goldens whose output changed have been regenerated as described above.
Documentation
No documentation changes are needed: this is an internal toolchain bump with no user-facing API changes.