Skip to content

add [[clang::lifetimebound]] attributes where suggested#140

Merged
tzcnt merged 1 commit into
mainfrom
lifetimebound
Jul 11, 2026
Merged

add [[clang::lifetimebound]] attributes where suggested#140
tzcnt merged 1 commit into
mainfrom
lifetimebound

Conversation

@tzcnt

@tzcnt tzcnt commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Clang 23 adds several new diagnostic warnings (-Wlifetime-safety class) that can detect certain classes of dangling references. This warning suggests to add [[clang::lifetimebound]] to a number of methods that reference object parameters. To maintain the goal of building TMC + examples/tests without any warnings, I've added these attributes in the examples also. This change isn't because of changes in TMC; the TMC attributes aren't transitive to the examples. The attributes being added here are specific to the examples code itself.

@tzcnt tzcnt merged commit 25fe3ba into main Jul 11, 2026
24 of 30 checks passed
@tzcnt tzcnt deleted the lifetimebound branch July 11, 2026 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant