File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ Developer Notes
32
32
- [ C++ data structures] ( #c-data-structures )
33
33
- [ Strings and formatting] ( #strings-and-formatting )
34
34
- [ Shadowing] ( #shadowing )
35
+ - [ Lifetimebound] ( #lifetimebound )
35
36
- [ Threads and synchronization] ( #threads-and-synchronization )
36
37
- [ Scripts] ( #scripts )
37
38
- [ Shebang] ( #shebang )
@@ -885,6 +886,16 @@ please name variables so that their names do not shadow variables defined in the
885
886
When using nested cycles, do not name the inner cycle variable the same as in
886
887
the outer cycle, etc.
887
888
889
+ Lifetimebound
890
+ --------------
891
+
892
+ The [Clang `lifetimebound`
893
+ attribute](https://clang.llvm.org/docs/AttributeReference.html#lifetimebound)
894
+ can be used to tell the compiler that a lifetime is bound to an object and
895
+ potentially see a compile-time warning if the object has a shorter lifetime from
896
+ the invalid use of a temporary. You can use the attribute by adding a `LIFETIMEBOUND`
897
+ annotation defined in `src/attributes.h`; please grep the codebase for examples.
898
+
888
899
Threads and synchronization
889
900
----------------------------
890
901
You can’t perform that action at this time.
0 commit comments