File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
lib/ASTGen/Sources/ASTGen Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -255,6 +255,20 @@ func checkMacroDefinition(
255
255
case " ExternalMacro " :
256
256
return Int ( BridgedMacroDefinitionKind . builtinExternalMacro. rawValue)
257
257
258
+ // These builtins don't exist, but are put into the standard library at
259
+ // least for documentation purposes right now. Don't emit a warning for
260
+ // them, but do fail operation.
261
+ case " FileIDMacro " ,
262
+ " FilePathMacro " ,
263
+ " FileMacro " ,
264
+ " FunctionMacro " ,
265
+ " LineMacro " ,
266
+ " ColumnMacro " ,
267
+ " DSOHandleMacro " ,
268
+ " WarningMacro " ,
269
+ " ErrorMacro " :
270
+ return - 1
271
+
258
272
default :
259
273
// Warn about the unknown builtin.
260
274
let srcMgr = SourceManager ( cxxDiagnosticEngine: diagEnginePtr)
Original file line number Diff line number Diff line change 25
25
public macro externalMacro< T> ( module: String , type: String ) -> T =
26
26
Builtin . ExternalMacro
27
27
28
- #if false
29
-
30
28
// File and path-related information
31
29
32
30
/// Produces a unique identifier for the given source file, comprised of
@@ -73,6 +71,4 @@ public macro warning(_ message: String) = Builtin.WarningMacro
73
71
@freestanding ( declaration)
74
72
public macro error( _ message: String ) = Builtin . ErrorMacro
75
73
76
- #endif // false
77
-
78
74
#endif // $Macros && hasAttribute(attached)
You can’t perform that action at this time.
0 commit comments