brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · c9fad10 Raw
62 lines · cpp
1// RUN: rm -rf %t2// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -Eonly -fmodules-cache-path=%t -I %S/Inputs/submodules %s -verify3// FIXME: When we have a syntax for modules in C++, use that.4 5@import std.vector;6 7#ifndef HAVE_VECTOR8#  error HAVE_VECTOR macro is not available (but should be)9#endif10 11#ifdef HAVE_TYPE_TRAITS12#  error HAVE_TYPE_TRAITS_MAP macro is available (but shouldn't be)13#endif14 15#ifdef HAVE_HASH_MAP16#  error HAVE_HASH_MAP macro is available (but shouldn't be)17#endif18 19@import std.typetraits; // expected-error{{no submodule named 'typetraits' in module 'std'; did you mean 'type_traits'?}}20 21#ifndef HAVE_VECTOR22#  error HAVE_VECTOR macro is not available (but should be)23#endif24 25#ifndef HAVE_TYPE_TRAITS26#  error HAVE_TYPE_TRAITS_MAP macro is not available (but should be)27#endif28 29#ifdef HAVE_HASH_MAP30#  error HAVE_HASH_MAP macro is available (but shouldn't be)31#endif32 33@import std.vector.compare; // expected-error{{no submodule named 'compare' in module 'std.vector'}}34 35@import std; // import everything in 'std'36 37#ifndef HAVE_VECTOR38#  error HAVE_VECTOR macro is not available (but should be)39#endif40 41#ifndef HAVE_TYPE_TRAITS42#  error HAVE_TYPE_TRAITS_MAP macro is not available (but should be)43#endif44 45#ifdef HAVE_HASH_MAP46#  error HAVE_HASH_MAP macro is available (but shouldn't be)47#endif48 49@import std.hash_map;50 51#ifndef HAVE_VECTOR52#  error HAVE_VECTOR macro is not available (but should be)53#endif54 55#ifndef HAVE_TYPE_TRAITS56#  error HAVE_TYPE_TRAITS_MAP macro is not available (but should be)57#endif58 59#ifndef HAVE_HASH_MAP60#  error HAVE_HASH_MAP macro is not available (but should be)61#endif62