Add a test importing a Clang module with non-identifier characters.

This requires no additional work beyond just parsing the identifier because Clang module maps already support such names in quotes.
This commit is contained in:
Tony Allevato
2024-06-25 19:36:34 -04:00
committed by Tony Allevato
parent d94bd80c62
commit 329261593e
3 changed files with 13 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
typedef struct {
int value;
} S;

View File

@@ -271,3 +271,7 @@ module CommonName {
header "CommonName.h"
export *
}
module "Weird C Module" {
header "WeirdCModule.h"
}

View File

@@ -0,0 +1,6 @@
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -I %S/Inputs/custom-modules %s -verify
import `Weird C Module`
_ = S().value
_ = `Weird C Module`.S().value