[lld][WebAssembly] Reinstate mistakenly disabled test. NFC
[llvm-project.git] / clang / test / SemaCXX / libstdcxx_gets_hack.cpp
blob0d915d01474c3d6cad9b307447244607a342b1d9
1 // RUN: %clang_cc1 -fsyntax-only %s -std=c++14 -verify
3 // This is a test for an egregious hack in Clang that works around
4 // an issue with libstdc++'s detection of whether glibc provides a
5 // ::gets function. If there is no ::gets, ignore
6 // using ::gets;
7 // in namespace std.
8 //
9 // See PR18402 and gcc.gnu.org/PR77795 for more details.
11 #ifdef BE_THE_HEADER
13 #pragma GCC system_header
14 namespace std {
15 using ::gets;
16 using ::getx; // expected-error {{no member named 'getx'}}
19 #else
21 #define BE_THE_HEADER
22 #include "libstdcxx_pointer_return_false_hack.cpp"
24 namespace foo {
25 using ::gets; // expected-error {{no member named 'gets'}}
28 #endif