From 5bd88cf7ddc3342c1a17578aa550e21383b4d079 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Tue, 14 Aug 2018 13:29:17 +0000 Subject: [PATCH] [libc++] Add missing #include in C11 features tests Summary: These #includes are quite important, since otherwise any #if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) checks are always false, and so we don't actually test for C11 support in the standard library. Reviewers: mclow.lists, EricWF Subscribers: christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50674 llvm-svn: 339675 --- libcxx/test/libcxx/language.support/has_c11_features.pass.cpp | 3 +++ libcxx/test/std/depr/depr.c.headers/float_h.pass.cpp | 2 ++ .../language.support/support.limits/c.limits/cfloat.pass.cpp | 2 ++ 3 files changed, 7 insertions(+) diff --git a/libcxx/test/libcxx/language.support/has_c11_features.pass.cpp b/libcxx/test/libcxx/language.support/has_c11_features.pass.cpp index cdccc00e21b4..4edec534eb98 100644 --- a/libcxx/test/libcxx/language.support/has_c11_features.pass.cpp +++ b/libcxx/test/libcxx/language.support/has_c11_features.pass.cpp @@ -14,6 +14,9 @@ // _LIBCPP_HAS_C11_FEATURES - which is defined in <__config> // They should always be the same +#include <__config> +#include "test_macros.h" + #ifdef TEST_HAS_C11_FEATURES # ifndef _LIBCPP_HAS_C11_FEATURES # error "TEST_HAS_C11_FEATURES is defined, but _LIBCPP_HAS_C11_FEATURES is not" diff --git a/libcxx/test/std/depr/depr.c.headers/float_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/float_h.pass.cpp index 3001c215cd19..84f249fa51f9 100644 --- a/libcxx/test/std/depr/depr.c.headers/float_h.pass.cpp +++ b/libcxx/test/std/depr/depr.c.headers/float_h.pass.cpp @@ -11,6 +11,8 @@ #include +#include "test_macros.h" + #ifndef FLT_ROUNDS #error FLT_ROUNDS not defined #endif diff --git a/libcxx/test/std/language.support/support.limits/c.limits/cfloat.pass.cpp b/libcxx/test/std/language.support/support.limits/c.limits/cfloat.pass.cpp index 6e399d0934bf..5313ad37f730 100644 --- a/libcxx/test/std/language.support/support.limits/c.limits/cfloat.pass.cpp +++ b/libcxx/test/std/language.support/support.limits/c.limits/cfloat.pass.cpp @@ -11,6 +11,8 @@ #include +#include "test_macros.h" + #ifndef FLT_ROUNDS #error FLT_ROUNDS not defined #endif