Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: `SCOPE_EXIT` macro is actively used in headers but it uses `__COUNTER__` that gives different value in different TU depending on number of previous `__COUNTER__` usages in translation unit. Therefore it violates ODR because function bodies for the same function become different. Clang detects this ODR violations in modularized builds when it merges AST from different modules or between global fragment and module. This diff create ODR safe version of `FB_ANONYMOUS_VARIABLE` that gives stable value but has limitation that it cannot be used more than once on the same line. Reviewed By: Gownta Differential Revision: D63825595 fbshipit-source-id: 7994094df5430a7e58bc51ef6576eae20b5cea0e
- Loading branch information