mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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:
committed by
Tony Allevato
parent
d94bd80c62
commit
329261593e
3
test/ClangImporter/Inputs/custom-modules/WeirdCModule.h
Normal file
3
test/ClangImporter/Inputs/custom-modules/WeirdCModule.h
Normal file
@@ -0,0 +1,3 @@
|
||||
typedef struct {
|
||||
int value;
|
||||
} S;
|
||||
@@ -271,3 +271,7 @@ module CommonName {
|
||||
header "CommonName.h"
|
||||
export *
|
||||
}
|
||||
|
||||
module "Weird C Module" {
|
||||
header "WeirdCModule.h"
|
||||
}
|
||||
|
||||
6
test/ClangImporter/escaped-identifier-module-name.swift
Normal file
6
test/ClangImporter/escaped-identifier-module-name.swift
Normal 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
|
||||
Reference in New Issue
Block a user