Skip to content

Commit bc668b6

Browse files
committed
[ASTGen] Fix nullability
For 'arbitrary' macro names
1 parent 9255371 commit bc668b6

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

include/swift/AST/ASTBridging.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ BridgedDeclBaseName
176176
BridgedDeclBaseName_createIdentifier(BridgedIdentifier identifier);
177177

178178
class BridgedDeclNameRef {
179-
void *_Nonnull opaque;
179+
void *_Nullable opaque;
180180

181181
public:
182182
BRIDGED_INLINE BridgedDeclNameRef();

test/ASTGen/macros.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,8 @@ func remoteCall<Result: ConjureRemoteValue>(function: String, arguments: [String
110110

111111
@Remote
112112
func f(a: Int, b: String) async throws -> String
113+
114+
@freestanding(declaration, names: arbitrary) macro bitwidthNumberedStructs(_ baseName: String) = #externalMacro(module: "MacroDefinition", type: "DefineBitwidthNumberedStructsMacro")
115+
struct TestArbitrary {
116+
#bitwidthNumberedStructs("MyIntOne")
117+
}

0 commit comments

Comments
 (0)