Skip to content

Commit

Permalink
FOLLY_ATTR_CLANG_UNINITIALIZED
Browse files Browse the repository at this point in the history
Summary: A preprocessor macro `FOLLY_ATTR_CLANG_UNINITIALIZED` expanding to `clang::uninitialized` when available.

Reviewed By: dmm-fb

Differential Revision: D63917336

fbshipit-source-id: 4fb08d15b29a6ed157d74eedab87b36515cdb67c
  • Loading branch information
yfeldblum authored and facebook-github-bot committed Oct 5, 2024
1 parent bd94b97 commit 4bcdc74
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions folly/CppAttributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@
#define FOLLY_ATTR_CLANG_NO_DESTROY
#endif

#if FOLLY_HAS_CPP_ATTRIBUTE(clang::uninitialized)
#define FOLLY_ATTR_CLANG_UNINITIALIZED clang::uninitialized
#else
#define FOLLY_ATTR_CLANG_UNINITIALIZED
#endif

/**
* Accesses to objects with types with this attribute are not subjected to
* type-based alias analysis, but are instead assumed to be able to alias any
Expand Down

0 comments on commit 4bcdc74

Please sign in to comment.