///
/// An import declaration imports the named module (or submodule). For example:
/// \code
-/// @import std.vector;
+/// @__experimental_modules_import std.vector;
/// \endcode
///
/// Import declarations can also be implicitly generated from #include/#import
bool OutOfDate : 1; // True if there may be additional
// information about this identifier
// stored externally.
- bool IsImport : 1; // True if this is the 'import' contextual
+ bool IsModulesImport : 1; // True if this is the 'import' contextual
// keyword.
// 1 bit left in 32-bit word.
RecomputeNeedsHandleIdentifier();
}
- /// \brief Determine whether this is the contextual keyword 'import'.
- bool isImport() const { return IsImport; }
+ /// \brief Determine whether this is the contextual keyword
+ /// '__experimental_modules_import'.
+ bool isModulesImport() const { return IsModulesImport; }
- /// \brief Set whether this identifier is the contextual keyword 'import'.
- void setImport(bool I) {
- IsImport = I;
+ /// \brief Set whether this identifier is the contextual keyword
+ /// '__experimental_modules_import'.
+ void setModulesImport(bool I) {
+ IsModulesImport = I;
if (I)
NeedsHandleIdentifier = true;
else
NeedsHandleIdentifier =
(isPoisoned() | hasMacroDefinition() | isCPlusPlusOperatorKeyword() |
isExtensionToken() | isCXX11CompatKeyword() || isOutOfDate() ||
- isImport());
+ isModulesImport());
}
};
// contents.
II->Entry = &Entry;
- // If this is the 'import' contextual keyword, mark it as such.
- if (Name.equals("import"))
- II->setImport(true);
+ // If this is the '__experimental_modules_import' contextual keyword,
+ // mark it as such.
+ if (Name.equals("__experimental_modules_import"))
+ II->setModulesImport(true);
return *II;
}
// If this is the 'import' contextual keyword, mark it as such.
if (Name.equals("import"))
- II->setImport(true);
+ II->setModulesImport(true);
}
return *II;
OBJC2_AT_KEYWORD(optional)
OBJC2_AT_KEYWORD(synthesize)
OBJC2_AT_KEYWORD(dynamic)
-OBJC2_AT_KEYWORD(import)
+OBJC2_AT_KEYWORD(__experimental_modules_import)
// TODO: What to do about context-sensitive keywords like:
// bycopy/byref/in/inout/oneway/out?
}
void DeclPrinter::VisitImportDecl(ImportDecl *D) {
- Out << "@import " << D->getImportedModule()->getFullModuleName()
+ Out << "@__experimental_modules_import " << D->getImportedModule()->getFullModuleName()
<< ";\n";
}
ChangedAfterLoad = false;
RevertedTokenID = false;
OutOfDate = false;
- IsImport = false;
+ IsModulesImport = false;
FETokenInfo = 0;
Entry = 0;
}
Diag(HashLoc, diag::warn_auto_module_import)
<< IncludeKind << PathString
<< FixItHint::CreateReplacement(ReplaceRange,
- "@import " + PathString.str().str() + ";");
+ "@__experimental_modules_import " + PathString.str().str() + ";");
}
// Load the module.
if (II.isExtensionToken() && !DisableMacroExpansion)
Diag(Identifier, diag::ext_token_used);
- // If this is the 'import' contextual keyword, note that the next token
- // indicates a module name.
+ // If this is the '__experimental_modules_import' contextual keyword, note
+ // that the next token indicates a module name.
//
- // Note that we do not treat 'import' as a contextual keyword when we're
- // in a caching lexer, because caching lexers only get used in contexts where
- // import declarations are disallowed.
- if (II.isImport() && !InMacroArgs && !DisableMacroExpansion &&
+ // Note that we do not treat '__experimental_modules_import' as a contextual
+ // keyword when we're in a caching lexer, because caching lexers only get
+ // used in contexts where import declarations are disallowed.
+ if (II.isModulesImport() && !InMacroArgs && !DisableMacroExpansion &&
getLangOptions().Modules && CurLexerKind != CLK_CachingLexer) {
ModuleImportLoc = Identifier.getLocation();
ModuleImportPath.clear();
case tok::objc_dynamic:
SingleDecl = ParseObjCPropertyDynamic(AtLoc);
break;
- case tok::objc_import:
+ case tok::objc___experimental_modules_import:
if (getLang().Modules)
return ParseModuleImport(AtLoc);
}
Parser::DeclGroupPtrTy Parser::ParseModuleImport(SourceLocation AtLoc) {
- assert(Tok.isObjCAtKeyword(tok::objc_import) &&
+ assert(Tok.isObjCAtKeyword(tok::objc___experimental_modules_import) &&
"Improper start to module import");
SourceLocation ImportLoc = ConsumeToken();
// Note: the run lines follow their respective tests, since line/column
// matter in this test.
-@import LibA.Extensions;
+@__experimental_modules_import LibA.Extensions;
// RUN: rm -rf %t
-// RUN: c-index-test -code-completion-at=%s:4:9 -fmodule-cache-path %t -fmodules -F %S/Inputs/Frameworks -I %S/Inputs/Headers %s | FileCheck -check-prefix=CHECK-TOP-LEVEL %s
+// RUN: c-index-test -code-completion-at=%s:4:32 -fmodule-cache-path %t -fmodules -F %S/Inputs/Frameworks -I %S/Inputs/Headers %s | FileCheck -check-prefix=CHECK-TOP-LEVEL %s
// CHECK-TOP-LEVEL: NotImplemented:{TypedText Framework} (50)
// CHECK-TOP-LEVEL: NotImplemented:{TypedText LibA} (50)
// CHECK-TOP-LEVEL: NotImplemented:{TypedText nested} (50)
-// RUN: c-index-test -code-completion-at=%s:4:14 -fmodule-cache-path %t -fmodules -F %S/Inputs/Frameworks -I %S/Inputs/Headers %s | FileCheck -check-prefix=CHECK-LIBA %s
+// RUN: c-index-test -code-completion-at=%s:4:37 -fmodule-cache-path %t -fmodules -F %S/Inputs/Frameworks -I %S/Inputs/Headers %s | FileCheck -check-prefix=CHECK-LIBA %s
// CHECK-LIBA: NotImplemented:{TypedText Extensions} (50)
// Parse the file, such that building the module will cause Clang to crash.
// RUN: not env CINDEXTEST_FAILONERROR=1 c-index-test -test-load-source all -fmodules -fmodule-cache-path %t -Xclang -fdisable-module-hash -I %S/Inputs/Headers -DCRASH %s 2> %t.err
// RUN: FileCheck < %t.err -check-prefix=CHECK-CRASH %s
-// CHECK-CRASH: crash-recovery-modules.m:16:9:{16:2-16:14}: fatal error: could not build module 'Crash'
+// CHECK-CRASH: crash-recovery-modules.m:16:32:{16:2-16:37}: fatal error: could not build module 'Crash'
// Parse the file again, without crashing, to make sure that
// subsequent parses do the right thing.
// REQUIRES: crash-recovery
// REQUIRES: shell
-@import Crash;
+@__experimental_modules_import Crash;
void test() {
const char* error = getCrashString();
-@import MutuallyRecursive2;
+@__experimental_modules_import MutuallyRecursive2;
-@import MutuallyRecursive1;
+@__experimental_modules_import MutuallyRecursive1;
-@import category_left;
+@__experimental_modules_import category_left;
@interface Foo(Bottom)
-(void)bottom;
@end
-@import category_right;
+@__experimental_modules_import category_right;
@interface LeftFoo(Bottom)
-(void)bottom;
-@import category_top;
+@__experimental_modules_import category_top;
@interface Foo(Left)
-(void)left;
-@import category_top;
+@__experimental_modules_import category_top;
@interface Foo(Other)
-(void)other;
-@import category_top;
+@__experimental_modules_import category_top;
@interface Foo(Right1)
-(void)right1;
-@import diamond_bottom;
+@__experimental_modules_import diamond_bottom;
-@import diamond_left;
-@import diamond_right;
+@__experimental_modules_import diamond_left;
+@__experimental_modules_import diamond_right;
char bottom(char *x);
-@import diamond_top;
+@__experimental_modules_import diamond_top;
float left(float *);
-@import diamond_top;
+@__experimental_modules_import diamond_top;
double right(double *);
-@import namespaces_top;
+@__experimental_modules_import namespaces_top;
namespace N1 { }
-@import namespaces_top;
+@__experimental_modules_import namespaces_top;
namespace N2 { }
-@import redecl_merge_left;
+@__experimental_modules_import redecl_merge_left;
@class C4;
@class C4;
@protocol P4;
@protocol P4;
@protocol P4;
-@import redecl_merge_right;
+@__experimental_modules_import redecl_merge_right;
@class B;
-@import redecl_merge_left;
+@__experimental_modules_import redecl_merge_left;
@class C4;
void accept_a_C4(C4*);
-@import redecl_merge_top;
+@__experimental_modules_import redecl_merge_top;
@class A;
-@import redecl_merge_top;
+@__experimental_modules_import redecl_merge_top;
@interface Super
@end
#endif
int ONE;
-@import redecl_merge_top.Explicit;
+@__experimental_modules_import redecl_merge_top.Explicit;
const int one = ONE;
@interface ClassWithDef
-@import A.One;
-@import B.One;
+@__experimental_modules_import A.One;
+@__experimental_modules_import B.One;
long *C1;
-@import A.Two;
-@import B.Two;
+@__experimental_modules_import A.Two;
+@__experimental_modules_import B.Two;
unsigned long *C2;
// RUN: %clang -fsyntax-only -fmodules -fmodule-cache-path %t -D__need_wint_t %s -Xclang -verify
#ifdef __SSE__
-@import _Builtin_intrinsics.intel.sse;
+@__experimental_modules_import _Builtin_intrinsics.intel.sse;
#endif
#ifdef __AVX2__
-@import _Builtin_intrinsics.intel.avx2;
+@__experimental_modules_import _Builtin_intrinsics.intel.avx2;
#endif
// RUN: %clang -fsyntax-only -isystem %S/Inputs/System/usr/include -fmodules -fmodule-cache-path %t -D__need_wint_t -Werror=implicit-function-declaration %s
// Supplied by compiler, but referenced from the "/usr/include" module map.
-@import cstd.float_constants;
+@__experimental_modules_import cstd.float_constants;
float getFltMax() { return FLT_MAX; }
// Supplied by the "/usr/include" module map.
-@import cstd.stdio;
+@__experimental_modules_import cstd.stdio;
void test_fprintf(FILE *file) {
fprintf(file, "Hello, modules\n");
}
// Supplied by compiler, which forwards to the the "/usr/include" version.
-@import cstd.stdint;
+@__experimental_modules_import cstd.stdint;
my_awesome_nonstandard_integer_type value;
// Supplied by the compiler; that version wins.
-@import cstd.stdbool;
+@__experimental_modules_import cstd.stdbool;
#ifndef bool
# error "bool was not defined!"
// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules -x objective-c -fmodule-cache-path %t -F %S/Inputs %s 2>&1 | FileCheck %s
// FIXME: When we have a syntax for modules in C, use that.
-@import MutuallyRecursive1;
+@__experimental_modules_import MutuallyRecursive1;
// FIXME: Lots of redundant diagnostics here, because the preprocessor
// can't currently tell the parser not to try to load the module again.
-// CHECK: MutuallyRecursive2.h:3:9: fatal error: cyclic dependency in module 'MutuallyRecursive1': MutuallyRecursive1 -> MutuallyRecursive2 -> MutuallyRecursive1
-// CHECK: MutuallyRecursive1.h:2:9: fatal error: could not build module 'MutuallyRecursive2'
-// CHECK: cycles.c:4:9: fatal error: could not build module 'MutuallyRecursive1'
+// CHECK: MutuallyRecursive2.h:3:32: fatal error: cyclic dependency in module 'MutuallyRecursive1': MutuallyRecursive1 -> MutuallyRecursive2 -> MutuallyRecursive1
+// CHECK: MutuallyRecursive1.h:2:32: fatal error: could not build module 'MutuallyRecursive2'
+// CHECK: cycles.c:4:32: fatal error: could not build module 'MutuallyRecursive1'
// in other file: expected-note{{previous definition is here}}
-@import decldef;
+@__experimental_modules_import decldef;
A *a1; // expected-error{{unknown type name 'A'}}
B *b1; // expected-error{{unknown type name 'B'}}
-@import decldef.Decl;
+@__experimental_modules_import decldef.Decl;
A *a2;
B *b;
// in diamond-bottom.h: expected-note{{passing argument to parameter 'x' here}}
-@import diamond_bottom;
+@__experimental_modules_import diamond_bottom;
void test_diamond(int i, float f, double d, char c) {
top(&i);
// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t -F %S/Inputs -I %S/Inputs -verify %s
#import "point.h"
-@import Module;
+@__experimental_modules_import Module;
#import "point.h"
// RUN: rm -rf %t
// RUN: %clang_cc1 -x objective-c -Wauto-import -fmodule-cache-path %t -fmodules -F %S/Inputs %s -verify
-@import Module.Sub;
+@__experimental_modules_import Module.Sub;
void test_Module_Sub() {
int *ip = Module_Sub;
}
-@import Module.Buried.Treasure;
+@__experimental_modules_import Module.Buried.Treasure;
void dig() {
unsigned *up = Buried_Treasure;
// RUN: %clang_cc1 -fmodules -x objective-c -fmodule-cache-path %t -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
// FIXME: When we have a syntax for modules in C, use that.
-@import irgen;
+@__experimental_modules_import irgen;
// CHECK: define void @triple_value
void triple_value(int *px) {
#ifdef NONEXISTENT
-@import load_nonexistent;
+@__experimental_modules_import load_nonexistent;
#endif
#ifdef FAILURE
-@import load_failure;
+@__experimental_modules_import load_failure;
#endif
// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodule-cache-path %t -fdisable-module-hash -emit-module -fmodule-name=load_failure %S/Inputs/module.map
// RUN: %clang_cc1 -fmodules -x objective-c -fmodule-cache-path %t -fdisable-module-hash %s -DNONEXISTENT 2>&1 | FileCheck -check-prefix=CHECK-NONEXISTENT %s
-// CHECK-NONEXISTENT: load_failure.c:2:9: fatal error: module 'load_nonexistent' not found
+// CHECK-NONEXISTENT: load_failure.c:2:32: fatal error: module 'load_nonexistent' not found
// RUN: not %clang_cc1 -fmodules -x objective-c -fmodule-cache-path %t -fdisable-module-hash %s -DFAILURE 2> %t.out
// RUN: FileCheck -check-prefix=CHECK-FAILURE %s < %t.out
-#define import @import
+#define import @__experimental_modules_import
import lookup_left_cxx;
#undef import
-#define IMPORT(X) @import X
+#define IMPORT(X) @__experimental_modules_import X
IMPORT(lookup_right_cxx);
void test(int i, float f) {
// lookup_left.h: expected-note{{using}}
// lookup_right.h: expected-note{{also found}}
-@import lookup_left_objc;
-@import lookup_right_objc;
+@__experimental_modules_import lookup_left_objc;
+@__experimental_modules_import lookup_right_objc;
void test(id x) {
[x method]; // expected-warning{{multiple methods named 'method' found}}
// RUN: %clang_cc1 -E -fmodules -x objective-c -fmodule-cache-path %t %s | FileCheck -check-prefix CHECK-PREPROCESSED %s
// FIXME: When we have a syntax for modules in C, use that.
-@import macros;
+@__experimental_modules_import macros;
#ifndef INTEGER
# error INTEGER macro should be visible
// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodule-cache-path %t -fmodules -I %S/Inputs %s -verify
-@import MethodPoolA;
+@__experimental_modules_import MethodPoolA;
// in other file: // expected-note{{using}}
[object method2:1];
}
-@import MethodPoolB;
+@__experimental_modules_import MethodPoolB;
void testMethod1Again(id object) {
[object method1];
// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodule-cache-path %t %s -verify
// FIXME: When we have a syntax for modules in C++, use that.
-@import module_private_left;
-@import module_private_right;
+@__experimental_modules_import module_private_left;
+@__experimental_modules_import module_private_right;
void test() {
int &ir = f0(1.0); // okay: f0() from 'right' is not visible
namespace N8 { }
-@import namespaces_left;
-@import namespaces_right;
+@__experimental_modules_import namespaces_left;
+@__experimental_modules_import namespaces_right;
void test() {
int &ir1 = N1::f(1);
return umbrella + umbrella_sub;
}
-@import Umbrella2;
+@__experimental_modules_import Umbrella2;
#include "a1.h"
#include "b1.h"
return a1 + b1 + nested2;
}
-@import nested_umbrella.a;
+@__experimental_modules_import nested_umbrella.a;
int testNestedUmbrellaA() {
return nested_umbrella_a;
return nested_umbrella_b; // expected-error{{use of undeclared identifier 'nested_umbrella_b'; did you mean 'nested_umbrella_a'?}}
}
-@import nested_umbrella.b;
+@__experimental_modules_import nested_umbrella.b;
int testNestedUmbrellaB() {
return nested_umbrella_b;
// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t -x objective-c -fmodule-name=category_other -emit-module %S/Inputs/module.map
// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t %s -verify
-@import category_bottom;
+@__experimental_modules_import category_bottom;
// Load another module that also adds categories to Foo, verify that
// we see those categories.
-@import category_other;
+@__experimental_modules_import category_other;
void test_other(Foo *foo) {
[foo other];
// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Wmodule-build -fmodule-cache-path %t -F %S/Inputs -verify %s
-@import Module; // expected-warning{{building module 'Module' from source}}
+@__experimental_modules_import Module; // expected-warning{{building module 'Module' from source}}
// RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -x objective-c++ -fmodule-cache-path %t -F %S/Inputs -I %S/Inputs -verify %s
// RUN: %clang_cc1 -fmodules -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -fmodule-cache-path %t -F %S/Inputs -I %S/Inputs -verify %s
#define FOO
-@import Module;
+@__experimental_modules_import Module;
@interface OtherClass
@end
# error MODULE_SUBFRAMEWORK_H should be hidden
#endif
-@import subdir;
+@__experimental_modules_import subdir;
const char *getSubdirTest() { return getSubdir(); }
// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t -F %S/Inputs -DFOO_RETURNS_INT_PTR -verify %s
// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t -F %S/Inputs -verify %s
-@import CmdLine;
+@__experimental_modules_import CmdLine;
void test() {
#ifdef FOO_RETURNS_INT_PTR
@class C2;
@class C3;
@class C3;
-@import redecl_merge_left;
+@__experimental_modules_import redecl_merge_left;
typedef struct my_struct_type *my_struct_ref;
@protocol P4;
@class C3;
@class C3;
-@import redecl_merge_right;
+@__experimental_modules_import redecl_merge_right;
@implementation A
- (Super*)init { return self; }
ClassWithDef *cwd1;
-@import redecl_merge_left_left;
+@__experimental_modules_import redecl_merge_left_left;
void test_C4a(C4 *c4) {
global_C4 = c4 = get_a_C4();
[cwd method];
}
-@import redecl_merge_bottom;
+@__experimental_modules_import redecl_merge_bottom;
void test_C4b() {
if (&refers_to_C4) {
-@import redeclarations_left;
-@import redeclarations_right;
+@__experimental_modules_import redeclarations_left;
+@__experimental_modules_import redeclarations_right;
@interface MyObject : NSObject
@end
// RUN: rm -rf %t
// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fmodules -F %S/Inputs %s -verify
-@import DependsOnModule.CXX; // expected-error{{module 'DependsOnModule.CXX' requires feature 'cplusplus'}}
+@__experimental_modules_import DependsOnModule.CXX; // expected-error{{module 'DependsOnModule.CXX' requires feature 'cplusplus'}}
// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fmodules -F %S/Inputs -F %S/Inputs/DependsOnModule.framework/Frameworks %s -verify
// RUN: %clang_cc1 -x objective-c++ -Wauto-import -fmodule-cache-path %t -fmodules -F %S/Inputs -F %S/Inputs/DependsOnModule.framework/Frameworks %s -verify
-@import DependsOnModule;
+@__experimental_modules_import DependsOnModule;
void testSubFramework() {
float *sf1 = sub_framework; // expected-error{{use of undeclared identifier 'sub_framework'}}
}
-@import DependsOnModule.SubFramework;
+@__experimental_modules_import DependsOnModule.SubFramework;
void testSubFrameworkAgain() {
float *sf2 = sub_framework;
}
#ifdef __cplusplus
-@import DependsOnModule.CXX;
+@__experimental_modules_import DependsOnModule.CXX;
CXXOnly cxxonly;
#endif
// RUN: %clang_cc1 -fmodules -x objective-c++ -Eonly -fmodule-cache-path %t -I %S/Inputs/submodules %s -verify
// FIXME: When we have a syntax for modules in C++, use that.
-@import std.vector;
+@__experimental_modules_import std.vector;
#ifndef HAVE_VECTOR
# error HAVE_VECTOR macro is not available (but should be)
# error HAVE_HASH_MAP macro is available (but shouldn't be)
#endif
-@import std.typetraits; // expected-error{{no submodule named 'typetraits' in module 'std'; did you mean 'type_traits'?}}
+@__experimental_modules_import std.typetraits; // expected-error{{no submodule named 'typetraits' in module 'std'; did you mean 'type_traits'?}}
#ifndef HAVE_VECTOR
# error HAVE_VECTOR macro is not available (but should be)
# error HAVE_HASH_MAP macro is available (but shouldn't be)
#endif
-@import std.vector.compare; // expected-error{{no submodule named 'compare' in module 'std.vector'}}
+@__experimental_modules_import std.vector.compare; // expected-error{{no submodule named 'compare' in module 'std.vector'}}
-@import std; // import everything in 'std'
+@__experimental_modules_import std; // import everything in 'std'
#ifndef HAVE_VECTOR
# error HAVE_VECTOR macro is not available (but should be)
# error HAVE_HASH_MAP macro is available (but shouldn't be)
#endif
-@import std.hash_map;
+@__experimental_modules_import std.hash_map;
#ifndef HAVE_VECTOR
# error HAVE_VECTOR macro is not available (but should be)
// RUN: %clang_cc1 -x objective-c++ -fmodule-cache-path %t -fmodules -I %S/Inputs/submodules %s -verify
// FIXME: When we have a syntax for modules in C++, use that.
-@import std.vector;
+@__experimental_modules_import std.vector;
vector<int> vi;
remove_reference<int&>::type *int_ptr = 0; // expected-error{{unknown type name 'remove_reference'}} \
// expected-error{{expected unqualified-id}}
-@import std.typetraits; // expected-error{{no submodule named 'typetraits' in module 'std'; did you mean 'type_traits'?}}
+@__experimental_modules_import std.typetraits; // expected-error{{no submodule named 'typetraits' in module 'std'; did you mean 'type_traits'?}}
vector<float> vf;
remove_reference<int&>::type *int_ptr2 = 0;
-@import std.vector.compare; // expected-error{{no submodule named 'compare' in module 'std.vector'}}
+@__experimental_modules_import std.vector.compare; // expected-error{{no submodule named 'compare' in module 'std.vector'}}
-@import std; // import everything in 'std'
+@__experimental_modules_import std; // import everything in 'std'
// hash_map still isn't available.
hash_map<int, float> ints_to_floats; // expected-error{{unknown type name 'hash_map'}} \
// expected-error{{expected unqualified-id}}
-@import std.hash_map;
+@__experimental_modules_import std.hash_map;
hash_map<int, float> ints_to_floats2;
// RUN: %clang_cc1 -Wauto-import -fmodule-cache-path %t -fmodules -F %S/Inputs %s -verify
// Note: transitively imports Module.Sub2.
-@import Module.Sub;
+@__experimental_modules_import Module.Sub;
int getValue() {
return *Module_Sub + *Module_Sub2;
// RUN: %clang_cc1 -x objective-c++ -fmodule-cache-path %t -fmodules -I %S/Inputs/wildcard-submodule-exports %s -verify
// FIXME: When we have a syntax for modules in C++, use that.
-@import C.One;
+@__experimental_modules_import C.One;
void test_C_One() {
int *A1_ptr = A1;
(void)B1; // expected-error{{use of undeclared identifier 'B1'}}
}
-@import C.Two;
+@__experimental_modules_import C.Two;
void test_C_Two() {
unsigned int *A2_ptr = A2;
unsigned long *C2_ptr = C2;
}
-@import B.One;
+@__experimental_modules_import B.One;
void test_B_One() {
short *B1_ptr = B1;