Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
288 commits
Select commit Hold shift + click to select a range
bb3e275
Fix incorrect test
sdkrystian Apr 15, 2026
fd3b77e
Use non-owning types in profile attribute arguments to avoid leaking …
sdkrystian Apr 15, 2026
7c9df32
Fix interface-to-implementation designator mismatch going undiagnosed
sdkrystian Apr 15, 2026
74bfb1c
Don't check enforced profiles when profiles are disabled
sdkrystian Apr 15, 2026
329f8ca
Add class template and modules tests
sdkrystian Apr 15, 2026
6876919
Add PCH support
sdkrystian Apr 15, 2026
dca8f0e
Add driver level -fprofiles flag
sdkrystian Apr 15, 2026
3a2b981
Add tests for module interfaces/implementations
sdkrystian Apr 15, 2026
152aea2
Use ProfileSuppressScope instead of DeclContext walk
sdkrystian Apr 15, 2026
7c93bce
Fix suppress for out-of-line data members
sdkrystian Apr 15, 2026
2677510
Fix suppress for out-of-line functions
sdkrystian Apr 15, 2026
402a9ba
Combine ProfileSuppressScope constructors
sdkrystian Apr 15, 2026
b78f923
Don't serialize TU-level enforced profiles state in module PCMs
sdkrystian Apr 15, 2026
5372c8a
Fix suppress on generic lambda
sdkrystian Apr 15, 2026
0459548
Add docs
sdkrystian Apr 16, 2026
d71e3d0
Fix suppress on inline member functions
sdkrystian Apr 16, 2026
7c41e8c
Fix suppress on data member initializers
sdkrystian Apr 16, 2026
bd6cff6
Correctly warn unused when profiles are disabled
sdkrystian Apr 16, 2026
335bbbb
Fix crash when missing left parenthesis
sdkrystian Apr 16, 2026
1b74f2c
Late parsed members require walk of lexical parents
sdkrystian Apr 16, 2026
8374ac9
Fix suppress on non-generic lambda
sdkrystian Apr 16, 2026
15ea59f
Introduce igsuppressed-on-SFINAE diagnostic category for profiles
sdkrystian Apr 25, 2026
cac2e1a
Refactor argument storage (again)
sdkrystian Apr 25, 2026
9073d19
Document intentional gaps in implementation
sdkrystian Apr 29, 2026
3f2de58
Support suppression of analysis based warnings
sdkrystian May 4, 2026
510b55b
Doc improvements
sdkrystian May 4, 2026
cbe7087
Add table to register CFG analysis based profiles
sdkrystian May 11, 2026
3aba380
Add CXX11Uninitialized attribute ([[uninitialized]])
sdkrystian May 11, 2026
3b09175
Initial initialization profile implementation
sdkrystian May 11, 2026
faec8e4
Class finalization profiles hook + test::class_final test profile
sdkrystian May 19, 2026
5f155d7
Hoist ProfileSuppressScope for class finalization callbacks out of loop
sdkrystian May 19, 2026
1863184
Add more class finalization profile callback tests
sdkrystian May 19, 2026
e6fbc63
Expand [[uninitalized]] to FieldDecl
sdkrystian May 22, 2026
49efd24
Remove stale .cursor/plans reference from profiles docs
sdkrystian Jun 2, 2026
4a9e83d
Test [[uninitialized]] with a language-synthesized initializer
sdkrystian Jun 2, 2026
f26e19e
Don't fire std::init static_runtime_init on trivial default-init
sdkrystian Jun 2, 2026
be05a1f
Don't fire uninit_with_initializer on a RecoveryExpr placeholder
sdkrystian Jun 2, 2026
7093919
Reject [[uninitialized]] on subjects that can't be uninitialized
sdkrystian Jun 2, 2026
77576cb
Ban [[uninitialized]] on unions under std::init
sdkrystian Jun 2, 2026
f6717c9
Apply uninit_with_initializer to data members with an NSDMI
sdkrystian Jun 2, 2026
7588418
Diagnose default-init of aggregates that leave members indeterminate
sdkrystian Jun 2, 2026
399cfda
Add a constructor-finalization profile dispatch
sdkrystian Jun 2, 2026
5e74d3c
Require constructors to initialize every member under std::init
sdkrystian Jun 2, 2026
1c39bab
Document the constructor-finalization pattern and new std::init rules
sdkrystian Jun 2, 2026
0f64c23
Inherit enforced profiles in partition implementation units
sdkrystian Jun 3, 2026
059e2bb
Unify class and constructor finialization
sdkrystian Jun 8, 2026
a98df31
Add [[ref_to_uninit]] attribute
sdkrystian Jun 16, 2026
8312166
Validate [[ref_to_uninit]] subject types
sdkrystian Jun 16, 2026
8e7c7f4
Enforce [[ref_to_uninit]] at variable initialization under std::init
sdkrystian Jun 16, 2026
57a5fff
Enforce [[ref_to_uninit]] on data-member initializers under std::init
sdkrystian Jun 16, 2026
101683d
Enforce [[ref_to_uninit]] on pointer assignment under std::init
sdkrystian Jun 16, 2026
f7f3a80
Enforce [[ref_to_uninit]] on call arguments under std::init
sdkrystian Jun 16, 2026
bab54f8
Enforce [[ref_to_uninit]] on return statements under std::init
sdkrystian Jun 16, 2026
699ffac
Document [[ref_to_uninit]] in the std::init profile docs
sdkrystian Jun 16, 2026
9ee24a0
Honor [[profiles::suppress]] on data-member initializers at finalization
sdkrystian Jun 16, 2026
9d323ae
Resolve std::init suppression from the declaration, not just the pars…
sdkrystian Jun 16, 2026
95fef4b
Consolidate finalization profile dispatch onto decl-aware suppression
sdkrystian Jun 16, 2026
6f947a4
Add init-profile attributes to the supported-attributes test list
sdkrystian Jun 16, 2026
2ae2490
Recognize a [[ref_to_uninit]] reference as a source of uninitialized …
sdkrystian Jun 16, 2026
aeaa8c3
Thread a marker-honoring flag through defaultInitLeavesScalarIndeterm…
sdkrystian Jun 16, 2026
37f3b77
Honor [[uninitialized]] members in the std::init uninit_decl rule
sdkrystian Jun 16, 2026
7d55ea1
Honor [[uninitialized]] members in the std::init ctor_uninit_member rule
sdkrystian Jun 16, 2026
fc191c9
Document std::init marked-member trust and guard uninit_with_initializer
sdkrystian Jun 16, 2026
55604ad
Keep CFG-uninit profiles diagnosing after the first TU error
sdkrystian Jun 19, 2026
2b51a3c
Dereference the base of an arrow member access in the ref_to_uninit r…
sdkrystian Jun 19, 2026
71023d5
Correct std::init profile docs and document known gaps
sdkrystian Jun 19, 2026
1abd7fc
Gate built-in test:: profiles behind -fprofiles-test-profiles
sdkrystian Jun 19, 2026
ed83740
Diagnose automatic arrays of class type under std::init uninit_decl
sdkrystian Jun 19, 2026
16c24a4
Diagnose uninitialized unions under std::init and exempt union constr…
sdkrystian Jun 19, 2026
9b1d2ce
Reject [[uninitialized]] on pointers under std::init
sdkrystian Jun 22, 2026
01e6f15
Exempt std::byte from the std::init uninitialized rules
sdkrystian Jun 22, 2026
c8d7e57
Exclude thread-locals from the std::init static_runtime_init rule
sdkrystian Jun 22, 2026
08e6d7c
Propagate [[ref_to_uninit]] through explicit pointer casts under std:…
sdkrystian Jun 22, 2026
7e9f78e
Propagate [[ref_to_uninit]] through reference casts and calls under s…
sdkrystian Jun 22, 2026
fd06ee9
Document ref_to_uninit cast propagation in the profiles framework docs
sdkrystian Jun 22, 2026
cb3c0dc
Rename the [[uninitialized]] init-profile marker to [[uninit]]
sdkrystian Jun 22, 2026
1ef4630
Document the new-expression and static [[uninit]] gaps in the std::in…
sdkrystian Jun 22, 2026
ba09556
Recognize an uninitialized new-expression as a source of uninitialize…
sdkrystian Jun 22, 2026
aa61881
Document new-expression ref_to_uninit recognition in the profiles fra…
sdkrystian Jun 22, 2026
c278f23
Document pointer_marker and union_marker usage in the profiles framew…
sdkrystian Jun 29, 2026
89c7817
Evaluate std::init parse-time rules on instantiations, not template p…
sdkrystian Jun 29, 2026
b9b29b5
Add template regression tests for std::init parse-time rules
sdkrystian Jun 29, 2026
690e9e2
Diagnose uninitialized base subobjects under std::init ctor_uninit_me…
sdkrystian Jun 29, 2026
d2f4c50
Test std::init ctor_uninit_member coverage of base subobjects
sdkrystian Jun 29, 2026
5ef242a
Reject [[uninit]] on a static or thread-local under std::init static_…
sdkrystian Jun 29, 2026
afa0eac
Test std::init static_marker coverage of static and thread-local markers
sdkrystian Jun 29, 2026
f811b1e
Document std::init static_marker and remove the closed static gap
sdkrystian Jun 29, 2026
aca47e2
Diagnose [[uninit]] member reads in ctor bodies under std::init unini…
sdkrystian Jun 29, 2026
350d66a
Test std::init read-before-init of [[uninit]] members in constructor …
sdkrystian Jun 29, 2026
68ebd6c
Skip delegating constructors in the std::init ctor-body read check
sdkrystian Jun 29, 2026
a3d85ce
Test delegating and other-object cases for std::init ctor-body reads
sdkrystian Jun 29, 2026
57d8e8c
Diagnose pointer assignment through indirection under std::init ref_t…
sdkrystian Jun 29, 2026
279c62c
Test std::init ref_to_uninit for pointer assignment through indirection
sdkrystian Jun 29, 2026
183cba3
Diagnose defaulted call arguments under std::init ref_to_uninit
sdkrystian Jun 29, 2026
7e43b50
Test std::init ref_to_uninit for defaulted call arguments
sdkrystian Jun 29, 2026
3244fc2
Document defaulted-argument ref_to_uninit coverage in the profiles fr…
sdkrystian Jun 29, 2026
45ede22
Recognize (*this).m member access in the std::init ctor-body check
sdkrystian Jun 29, 2026
0bc971d
Test (*this).m member access in the std::init ctor-body check
sdkrystian Jun 29, 2026
9e06f4d
Document (*this).m recognition in the std::init ctor-body check
sdkrystian Jun 29, 2026
dedcaad
Defer std::init ref_to_uninit binding checks in dependent contexts
sdkrystian Jun 29, 2026
1643520
Document dependent-context deferral of the ref_to_uninit binding checks
sdkrystian Jun 30, 2026
e25cc9b
Extract the std::init [[uninit]] marker check into a shared helper
sdkrystian Jun 30, 2026
4e051b1
Re-check std::init pointer_marker / union_marker at template instanti…
sdkrystian Jun 30, 2026
82e6595
Document the instantiation re-check of the std::init marker rules
sdkrystian Jun 30, 2026
67c53fc
Test a non-dependent pointer marker deferred to template instantiation
sdkrystian Jun 30, 2026
6fb5e2b
Align the profiles framework docs with the implementation
sdkrystian Jun 30, 2026
77aed2c
Add a read-only mode to the ref_to_uninit recognizer
sdkrystian Jun 30, 2026
1e76874
Diagnose reads through [[ref_to_uninit]] under std::init
sdkrystian Jun 30, 2026
f59f591
Test std::init read-through of [[ref_to_uninit]]
sdkrystian Jun 30, 2026
8a38c99
Document std::init ref_to_uninit read-through enforcement
sdkrystian Jun 30, 2026
e640d9a
Enforce [[ref_to_uninit]] on constructor member-initializers
sdkrystian Jun 30, 2026
12005a6
Enforce [[ref_to_uninit]] on aggregate field initialization
sdkrystian Jun 30, 2026
85e731c
Test std::init ref_to_uninit on member and aggregate init
sdkrystian Jun 30, 2026
873d1df
Document ref_to_uninit member/aggregate init check sites
sdkrystian Jun 30, 2026
fb7a4db
Diagnose ++/-- reads of [[uninit]] members in ctor bodies
sdkrystian Jun 30, 2026
1df624f
Test std::init ctor-body increment/decrement reads
sdkrystian Jun 30, 2026
53d20f8
Document increment/decrement in the ctor-body read check
sdkrystian Jun 30, 2026
aa70ab3
Reject [[ref_to_uninit]] on function pointers/references
sdkrystian Jul 1, 2026
8687b40
Classify ref_to_uninit sources as init/uninit/unknown
sdkrystian Jul 1, 2026
580289a
Don't reject [[ref_to_uninit]] bindings from unknown sources
sdkrystian Jul 1, 2026
2512e6e
Stop parse-time suppress stack leaking into finalization checks
sdkrystian Jul 1, 2026
021ca87
Add regression tests for finalization suppress-leak fix
sdkrystian Jul 1, 2026
93246e1
Document finalization suppression ignores parse-time stack
sdkrystian Jul 1, 2026
960fbc3
Add nested member-class variant to finalization leak test
sdkrystian Jul 1, 2026
6f6316b
Remove redundant Sema.h includes from parser files
sdkrystian Jul 3, 2026
acf4408
Harden the ParsedAttr custom-data accessors and pool allocators
sdkrystian Jul 3, 2026
d6d2abc
Document TryParseProfilesAttribute and null-init its CustomData
sdkrystian Jul 3, 2026
f911ff0
Use hasEnforcedCFGUninitProfile for both CFG-uninit profile gates
sdkrystian Jul 3, 2026
0fefcaa
Share one EnforcedProfile struct across Sema, Module, and the reader
sdkrystian Jul 3, 2026
d17bbe3
Extract enforced-profile blob encode/decode helpers
sdkrystian Jul 3, 2026
663de12
Keep a single getCanonicalProfileArgumentSpelling
sdkrystian Jul 3, 2026
036c142
Fold the duplicated module-attribute rejection loops into a helper
sdkrystian Jul 3, 2026
02efabf
Derive uninit_with_initializer inputs from the checked declaration
sdkrystian Jul 3, 2026
6094e01
Name the static_runtime_init check instead of an else-if lambda
sdkrystian Jul 3, 2026
8b49eae
Extract the uninit_decl and static_marker rules into named members
sdkrystian Jul 3, 2026
b064ebc
Share the uninit-recognizer pass-through and marker-lookup arms
sdkrystian Jul 3, 2026
586515e
Share the template-pattern deferral of the Decl-less std::init checks
sdkrystian Jul 3, 2026
263025d
Merge the duplicated call-argument ref_to_uninit checks
sdkrystian Jul 3, 2026
b0be0d5
Give the ref_to_uninit binding checks a decl-target wrapper
sdkrystian Jul 3, 2026
670ef80
Funnel ProfileSuppressScope pushes through one method
sdkrystian Jul 3, 2026
fdca516
Encapsulate the profile-argument parallel-array plumbing
sdkrystian Jul 3, 2026
a383c9c
Share the CFG configuration between the main and post-error passes
sdkrystian Jul 3, 2026
d063d4c
Move the profiles framework into a SemaProfiles subsystem
sdkrystian Jul 3, 2026
bd7c5d1
Normalize the std::init rule entry-point names
sdkrystian Jul 3, 2026
934297b
Don't treat const ref/pointer uses as profile uninit reads
sdkrystian Jul 3, 2026
eb366ce
Defer [[ref_to_uninit]] type validation to instantiation
sdkrystian Jul 3, 2026
978bf26
Resolve anonymous members to their field in ctor ref_to_uninit checks
sdkrystian Jul 3, 2026
88580c8
Warn instead of erroring on unknown module/import attributes
sdkrystian Jul 3, 2026
7a82e90
Honor field suppress scopes in late-parsed member initializers
sdkrystian Jul 3, 2026
54eb52e
Gate static_runtime_init's const-init evaluation on enforcement
sdkrystian Jul 3, 2026
7216d32
Stop the enforce placement check deserializing the whole PCH
sdkrystian Jul 3, 2026
abfe828
Check ref_to_uninit on arguments at parameter copy-initialization
sdkrystian Jul 3, 2026
17c22c1
Check member-initializer reads in the std::init ctor pass
sdkrystian Jul 3, 2026
ef6c353
Treat this-capturing lambdas as member reads in the ctor pass
sdkrystian Jul 3, 2026
02d3987
Check ref_to_uninit on lambda init-capture bindings
sdkrystian Jul 3, 2026
755cb66
Track inherited [[uninit]] members from ctor-less bases
sdkrystian Jul 3, 2026
838e295
Check ref_to_uninit on new-expression initializers
sdkrystian Jul 3, 2026
b505371
Check ref_to_uninit in parenthesized aggregate initialization
sdkrystian Jul 3, 2026
b53fa12
Re-check [[uninit]] against reference types at instantiation
sdkrystian Jul 3, 2026
756bb00
Check ref_to_uninit on thrown pointer operands
sdkrystian Jul 3, 2026
bf078b9
Diagnose self-initialization reads under CFG uninit profiles
sdkrystian Jul 3, 2026
7989eb8
Check [[uninit]] marker placement against the base element type
sdkrystian Jul 3, 2026
07e6c0c
Diagnose subobject reads of [[uninit]] objects in the read-through check
sdkrystian Jul 3, 2026
6e2490e
Check ref_to_uninit on by-reference lambda captures
sdkrystian Jul 3, 2026
810d515
Record enforce designators from the ungated enforcement list
sdkrystian Jul 3, 2026
fd51377
Test header-unit enforcement and require
sdkrystian Jul 3, 2026
7467712
Diagnose redeclarations outside a compatible profile dominion
sdkrystian Jul 3, 2026
f4a92ab
Diagnose element reads of [[uninit]] arrays in the read-through check
sdkrystian Jul 6, 2026
79e81ee
Thread the uninit recognizers' read mode through an access-options st…
sdkrystian Jul 6, 2026
80c6d11
Add a write mode to the uninit recognizers
sdkrystian Jul 6, 2026
caa8304
Diagnose subobject writes of [[uninit]] objects under std::init
sdkrystian Jul 6, 2026
9692934
Test std::init subobject writes of [[uninit]] objects
sdkrystian Jul 6, 2026
ff69922
Document the std::init uninit_write rule
sdkrystian Jul 6, 2026
37f8b2b
Check read-through on compound-assignment and increment operands
sdkrystian Jul 6, 2026
f0b0d9b
Pin whole-record copies through [[ref_to_uninit]] in tests and docs
sdkrystian Jul 6, 2026
2bdc32b
Check ref_to_uninit on arguments of calls without a declared callee
sdkrystian Jul 6, 2026
08d0378
Check ref_to_uninit on variadic call arguments
sdkrystian Jul 6, 2026
0e461e2
Parse profiles attributes leniently when -fprofiles is off
sdkrystian Jul 6, 2026
327aba6
Check ref_to_uninit on variadic functor and lambda arguments
sdkrystian Jul 6, 2026
2be3a1c
Record the suppressed construct's begin location on the suppress stack
sdkrystian Jul 7, 2026
07b5b84
Match parse-time suppressions by dominion begin location
sdkrystian Jul 7, 2026
1a25ea0
Add regression tests for suppress leaking into instantiations
sdkrystian Jul 7, 2026
a476a15
Fold the finalization suppress guard into dominion matching
sdkrystian Jul 7, 2026
2c11402
Document dominion matching of the parse-time suppress stack
sdkrystian Jul 7, 2026
bb1b14e
Record the suppressed construct's end location on the suppress stack
sdkrystian Jul 7, 2026
0ef203f
Bound dominion matching by the suppressed construct's end location
sdkrystian Jul 7, 2026
b03b892
Add regression tests for suppress leaking past a construct's end
sdkrystian Jul 7, 2026
3df616e
Document end-bounding of the parse-time suppress dominion
sdkrystian Jul 7, 2026
a9ed99e
Funnel the operator, throw, and new std::init checks through shared h…
sdkrystian Jul 7, 2026
dd78650
Diagnose non-dependent std::init violations at template definition time
sdkrystian Jul 7, 2026
fe243ec
Update stale aggregate-hook comments to the instantiation-dependence …
sdkrystian Jul 8, 2026
13da5a2
Check ref_to_uninit on the implicit object argument
sdkrystian Jul 8, 2026
d8e6841
Extract the ctor-body pass's tracked-member collection into shared he…
sdkrystian Jul 8, 2026
ead2a73
Track [[uninit]] members of constructor-less aggregate locals
sdkrystian Jul 8, 2026
72e6eda
Skip static call operators in the object-argument check
sdkrystian Jul 8, 2026
6c08ff6
Document that pointer-to-member calls bypass the object-argument check
sdkrystian Jul 8, 2026
2bcedf1
Resolve tracked member accesses through one lookup result
sdkrystian Jul 8, 2026
2b82131
Test member operator[] and unevaluated decltype at the object-argumen…
sdkrystian Jul 8, 2026
6d558e6
Test union locals and placement-new escapes in the local-member pass
sdkrystian Jul 8, 2026
55426e7
Keep the R1 local-pass example literals on one line
sdkrystian Jul 8, 2026
5881bcf
Note the anonymous-aggregate and array gaps in the local-member pass
sdkrystian Jul 8, 2026
ebdeae1
Refresh the std::init overview for the new flow and object-argument c…
sdkrystian Jul 8, 2026
698e1ac
Update the uninit marker docs for the flow-checked member reads
sdkrystian Jul 8, 2026
59f34a4
Split the profiles framework internals into their own doc
sdkrystian Jul 8, 2026
1574a0f
Condense the profiles internals doc to design-doc register
sdkrystian Jul 8, 2026
7c75cd4
Rewrite the profiles framework user doc
sdkrystian Jul 8, 2026
9a866c6
Rewrite the std::init docs user-facing
sdkrystian Jul 8, 2026
c3efa17
Document strict assignment-only crediting in the std::init ctor-body …
sdkrystian Jul 15, 2026
148eb6e
Reject [[uninit]] when default-initialization is not a no-op
sdkrystian Jul 15, 2026
abe3ca2
Treat null pointer sources as unknown storage in the std::init recogn…
sdkrystian Jul 15, 2026
36d5a17
Credit parse-order whole-entity stores in the std::init recognizers
sdkrystian Jul 15, 2026
6497441
Exclude parameters from the std::init null-initializer classification
sdkrystian Jul 15, 2026
ac84912
Pin std::init field-marker, store-credit, and null-source boundaries
sdkrystian Jul 15, 2026
99e5ab8
Check ref_to_uninit on aggregate array-element bindings
sdkrystian Jul 15, 2026
731c3f0
Check ref_to_uninit on lambda and block returns
sdkrystian Jul 15, 2026
90b6947
Credit parse-order member stores per tracked base object
sdkrystian Jul 15, 2026
8662756
Add [[now_init]] and credit marked arguments of its callees
sdkrystian Jul 15, 2026
23c5715
Restrict the new-initializer binding check to scalar allocations
sdkrystian Jul 15, 2026
51e54ed
Key member store credit on the parse-time pattern function
sdkrystian Jul 15, 2026
eebb4a6
Make -fprofiles a Compatible language option
sdkrystian Jul 17, 2026
5d982b2
Classify known C allocator callees in the uninit recognizers
sdkrystian Jul 17, 2026
10c1b23
Classify raw operator new callees as uninitialized sources
sdkrystian Jul 17, 2026
33e0ba0
Check anonymous-struct members in ctor_uninit_member
sdkrystian Jul 17, 2026
ed76cab
Check anonymous-union members in ctor_uninit_member
sdkrystian Jul 17, 2026
d42e42f
Add the [[now_uninit]] function attribute
sdkrystian Jul 17, 2026
0f76405
Withdraw store credit at calls to [[now_uninit]] functions
sdkrystian Jul 17, 2026
33d16ff
Correct the untracked-copy rationale and pin the trust boundaries
sdkrystian Jul 17, 2026
458068e
Replay events as the local-member pass's transfer function
sdkrystian Jul 17, 2026
fcacd5e
Track copies of tracked locals in the local-member pass
sdkrystian Jul 17, 2026
5196b8c
Track [[uninit]] members of by-value slot parameters
sdkrystian Jul 17, 2026
6519490
Exempt system-header code from profile enforcement pending [[profiles…
sdkrystian Jul 17, 2026
66b9688
Enable assertions in the weekly profiles clang build
sdkrystian Jul 17, 2026
aeb3bbb
Add a weekly CI job compiling Boost with std::init enforced
sdkrystian Jul 17, 2026
cafa69a
Withdraw before crediting at dual [[now_init]]/[[now_uninit]] calls
sdkrystian Jul 17, 2026
f888604
Skip unnamed bit-fields in the union indeterminacy walk
sdkrystian Jul 17, 2026
c3f48ac
Exempt all-std::byte unions from the indeterminacy walk
sdkrystian Jul 17, 2026
ee29811
Recurse into NSDMI-activated anonymous variants of unions
sdkrystian Jul 17, 2026
c039f0d
Summarize std::init profile violations from the Boost build
sdkrystian Jul 17, 2026
a43af16
Add an implementation plan for the std::core_ub profile
vinniefalco Jul 20, 2026
7d73205
Add the std::core_ub profile guarding integer division by zero
vinniefalco Jul 20, 2026
d8ec3a0
Honor [[profiles::suppress(std::core_ub)]] in CodeGen
vinniefalco Jul 20, 2026
451cc44
Guard signed integer overflow under std::core_ub
vinniefalco Jul 20, 2026
0ca6d8b
Guard invalid shifts under std::core_ub
vinniefalco Jul 20, 2026
f1f600b
Guard misaligned access under std::core_ub
vinniefalco Jul 20, 2026
6718119
Guard null dereference under std::core_ub
vinniefalco Jul 20, 2026
47ac452
Guard array bounds under std::core_ub
vinniefalco Jul 20, 2026
e148e93
Guard float-to-int conversion overflow under std::core_ub
vinniefalco Jul 20, 2026
57fa18f
Guard out-of-range enum values under std::core_ub
vinniefalco Jul 20, 2026
b5ea5c4
Guard falling off a value-returning function under std::core_ub
vinniefalco Jul 20, 2026
0ae4a30
Document the std::core_ub profile
vinniefalco Jul 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions .github/workflows/profiles-boost-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: Profiles Boost Build

# Compiles Boost with the std::init profile enforced, using a clang built by the
# weekly profiles release, and publishes the raw compiler log for inspection.
#
# Normally dispatched by weekly-profiles-release.yml right after the weekly
# release is cut (passing that run's id in clang_run_id). Can also be run
# manually: omit clang_run_id to pull the latest published release instead.

on:
workflow_dispatch:
inputs:
clang_run_id:
description: "weekly-profiles-release run id to take the clang artifact from (empty = latest release)"
required: false
default: ""
boost_ref:
description: "Boost superproject git ref (branch or tag)"
required: false
default: "master"

permissions:
actions: read
contents: read

jobs:
build-boost:
name: Build Boost (std::init enforced)
# ubuntu-24.04 for a newer libstdc++ (cleaner c++23); the 22.04-built clang
# runs fine here.
runs-on: ubuntu-24.04
steps:
- name: Checkout profiles branch (helpers)
uses: actions/checkout@v4

- name: Install a recent libstdc++
run: sudo apt-get update && sudo apt-get install -y g++-14

- name: Download clang (from weekly run)
if: inputs.clang_run_id != ''
uses: actions/download-artifact@v4
with:
name: clang-profiles-linux-x86_64
path: clang-dl
run-id: ${{ inputs.clang_run_id }}
github-token: ${{ github.token }}

- name: Download clang (latest release)
if: inputs.clang_run_id == ''
env:
GH_TOKEN: ${{ github.token }}
run: |
mkdir -p clang-dl
gh release download --repo "${{ github.repository }}" \
--pattern 'clang-profiles-linux-x86_64.tar.gz' --dir clang-dl

- name: Unpack clang
run: |
mkdir -p "$RUNNER_TEMP/clang"
tar xzf clang-dl/clang-profiles-linux-x86_64.tar.gz -C "$RUNNER_TEMP/clang"
"$RUNNER_TEMP/clang/bin/clang++" --version
echo "PROFILES_CLANGXX=$RUNNER_TEMP/clang/bin/clang++" >> "$GITHUB_ENV"
echo "PROFILES_PRELUDE=$GITHUB_WORKSPACE/clang/utils/profiles-boost/prelude.hpp" >> "$GITHUB_ENV"
mkdir -p "$GITHUB_WORKSPACE/crash"
echo "PROFILES_CRASH_DIR=$GITHUB_WORKSPACE/crash" >> "$GITHUB_ENV"

- name: Clone Boost
run: |
git clone --depth 1 --recursive --shallow-submodules \
--branch "${{ inputs.boost_ref || 'master' }}" \
https://github.com/boostorg/boost boost

- name: Bootstrap Boost.Build
working-directory: boost
run: |
./bootstrap.sh
./b2 headers

- name: Build Boost with std::init enforced
working-directory: boost
run: |
set -o pipefail
# Violations are hard errors, so b2 is expected to exit non-zero; the
# log is the deliverable, so never fail the job on that.
./b2 \
--user-config="$GITHUB_WORKSPACE/clang/utils/profiles-boost/user-config.jam" \
toolset=clang-profiles \
cxxstd=23 \
testing.execute=off \
-k -j"$(nproc)" \
libs/*/test \
2>&1 | tee "$GITHUB_WORKSPACE/boost-profiles.log" || true

- name: Summarize & visualize profile violations
if: always()
run: |
echo "_Boost ref: \`${{ inputs.boost_ref || 'master' }}\`_" >> "$GITHUB_STEP_SUMMARY"
python3 clang/utils/profiles-boost/summarize.py \
--log "$GITHUB_WORKSPACE/boost-profiles.log" \
--boost-root "$GITHUB_WORKSPACE/boost" \
--json "$GITHUB_WORKSPACE/summary.json" \
--html "$GITHUB_WORKSPACE/report.html" \
>> "$GITHUB_STEP_SUMMARY"

- name: Upload log, report and crash reproducers
if: always()
uses: actions/upload-artifact@v4
with:
name: boost-profiles-log
path: |
boost-profiles.log
summary.json
report.html
crash/
if-no-files-found: warn
17 changes: 17 additions & 0 deletions .github/workflows/schedule-profiles-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Schedule Profiles Build

on:
schedule:
- cron: '0 12 * * 5'

permissions:
actions: write

jobs:
dispatch:
runs-on: ubuntu-latest
steps:
- name: Trigger build on profiles-framework
env:
GH_TOKEN: ${{ github.token }}
run: gh workflow run weekly-profiles-release.yml --repo ${{ github.repository }} --ref profiles-framework
133 changes: 133 additions & 0 deletions .github/workflows/weekly-profiles-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
name: Weekly Profiles Release

on:
workflow_dispatch:

permissions:
contents: write

jobs:
build-linux:
name: Build Linux x86_64
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: sudo apt-get install -y ninja-build ccache

- name: Restore ccache
uses: actions/cache@v4
with:
path: ~/.ccache
key: ccache-linux-${{ github.sha }}
restore-keys: ccache-linux-

- name: Configure
run: |
cmake -G Ninja -S llvm -B build \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DCMAKE_C_COMPILER=gcc \
-DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DLLVM_ENABLE_PROJECTS=clang \
-DLLVM_TARGETS_TO_BUILD="X86;AArch64" \
-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON \
-DCMAKE_INSTALL_PREFIX=build/install

- name: Build and install
run: ninja -C build install-clang install-clang-resource-headers

- name: Package
run: tar czf clang-profiles-linux-x86_64.tar.gz -C build/install .

- uses: actions/upload-artifact@v4
with:
name: clang-profiles-linux-x86_64
path: clang-profiles-linux-x86_64.tar.gz

build-windows:
name: Build Windows x86_64
runs-on: windows-2022
steps:
- uses: actions/checkout@v4

- uses: ilammy/msvc-dev-cmd@v1

- name: Configure
run: >
cmake -G Ninja -S llvm -B build
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_C_COMPILER=cl
-DCMAKE_CXX_COMPILER=cl
-DLLVM_ENABLE_PROJECTS=clang
-DLLVM_TARGETS_TO_BUILD="X86;AArch64"
-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON
-DCMAKE_INSTALL_PREFIX=build/install

- name: Build and install
run: ninja -C build install-clang install-clang-resource-headers

- name: Package
run: Compress-Archive -Path build\install\* -DestinationPath clang-profiles-windows-x86_64.zip

- uses: actions/upload-artifact@v4
with:
name: clang-profiles-windows-x86_64
path: clang-profiles-windows-x86_64.zip

create-release:
name: Create GitHub Release
needs: [build-linux, build-windows]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: clang-profiles-linux-x86_64
path: artifacts

- uses: actions/download-artifact@v4
with:
name: clang-profiles-windows-x86_64
path: artifacts

- name: Compute tag
id: tag
run: |
date_tag="profiles-$(date -u +%Y-%m-%d)"
echo "tag=${date_tag}-${{ github.run_number }}" >> "$GITHUB_OUTPUT"
echo "name=Profiles Build $(date -u +%Y-%m-%d) #${{ github.run_number }}" >> "$GITHUB_OUTPUT"

- uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.tag.outputs.tag }}
name: ${{ steps.tag.outputs.name }}
target_commitish: ${{ github.sha }}
files: artifacts/*
body: |
Automated weekly build of Clang with safety profiles support.

**Branch:** `${{ github.ref_name }}`
**Commit:** `${{ github.sha }}`

### Artifacts
- `clang-profiles-linux-x86_64.tar.gz` — Linux x86_64 (Ubuntu 22.04, gcc)
- `clang-profiles-windows-x86_64.zip` — Windows x86_64 (MSVC 2022)

trigger-boost:
name: Trigger Boost profiles build
needs: [create-release]
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- name: Dispatch Boost build against this run's clang
env:
GH_TOKEN: ${{ github.token }}
run: >
gh workflow run profiles-boost-build.yml
--repo ${{ github.repository }}
--ref ${{ github.ref_name }}
-f clang_run_id=${{ github.run_id }}
Loading