Skip to content

Commit

Permalink
Fix the Apple LLVM version when disabling tests for Xcode 12
Browse files Browse the repository at this point in the history
Summary: [Folly] Fix the Apple LLVM version when disabling is-constexpr-default-constructible test expectations over types with non-trivial destructors for Xcode 12.

Differential Revision: D23917973

fbshipit-source-id: 1238ec5a53ba0ff73afd67f81ad2868f37196eaa
  • Loading branch information
yfeldblum authored and facebook-github-bot committed Sep 25, 2020
1 parent 137a724 commit d8e1014
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions folly/Portability.h
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,12 @@ constexpr auto kIsWindows = true;
constexpr auto kIsWindows = false;
#endif

#if defined(__APPLE__)
constexpr auto kIsApple = true;
#else
constexpr auto kIsApple = false;
#endif

constexpr bool kIsAppleIOS = FOLLY_APPLE_IOS == 1;
constexpr bool kIsAppleMacOS = FOLLY_APPLE_MACOS == 1;
constexpr bool kIsAppleTVOS = FOLLY_APPLE_TVOS == 1;
Expand Down
2 changes: 1 addition & 1 deletion folly/test/TraitsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ TEST(Traits, is_constexpr_default_constructible) {
// under clang 10, crash: https://bugs.llvm.org/show_bug.cgi?id=47620
// and, with assertions disabled, expectation failures showing compiler
// deviation from the language spec
if (kClangVerMajor != 10) {
if (kClangVerMajor != (kIsApple ? 12 : 10)) {
struct NonTrivialDtor {
~NonTrivialDtor() {}
};
Expand Down

0 comments on commit d8e1014

Please sign in to comment.