diff --git a/test/ClangImporter/Inputs/custom-modules/module.modulemap b/test/ClangImporter/Inputs/custom-modules/module.modulemap index 2bd2627191949..89ccced682ba0 100644 --- a/test/ClangImporter/Inputs/custom-modules/module.modulemap +++ b/test/ClangImporter/Inputs/custom-modules/module.modulemap @@ -279,3 +279,7 @@ module "Weird C Module" { module Aliases { header "Aliases.h" } + +module RetroactiveVersioning { + header "versioning.h" +} diff --git a/test/ClangImporter/Inputs/custom-modules/versioning.h b/test/ClangImporter/Inputs/custom-modules/versioning.h new file mode 100644 index 0000000000000..dcc6bb0840ee7 --- /dev/null +++ b/test/ClangImporter/Inputs/custom-modules/versioning.h @@ -0,0 +1,9 @@ +#pragma once +extern const int kVersion; +extern const int kVersion1; +extern const int kVersion2; +#if OLD_DEPLOYMENT_TARGET +#define kVersion kVersion1 +#else +#define kVersion kVersion2 +#endif diff --git a/test/ClangImporter/versioning.swift b/test/ClangImporter/versioning.swift new file mode 100644 index 0000000000000..a5077b92ecd1f --- /dev/null +++ b/test/ClangImporter/versioning.swift @@ -0,0 +1,7 @@ +// RUN: %target-typecheck-verify-swift %s -I %S/Inputs/custom-modules +// XFAIL: * + +// expected-no-diagnostics + +import RetroactiveVersioning +let _ = kVersion