File tree Expand file tree Collapse file tree 4 files changed +1
-31
lines changed
lib/codeql/swift/printast Expand file tree Collapse file tree 4 files changed +1
-31
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class PrintAstConfiguration extends TPrintAstConfiguration {
20
20
/**
21
21
* Holds if the AST for `e` should be printed. By default, holds for all.
22
22
*/
23
- predicate shouldPrint ( Locatable e ) { not e instanceof Diagnostics }
23
+ predicate shouldPrint ( Locatable e ) { not e instanceof Diagnostics and not e instanceof MacroRole }
24
24
}
25
25
26
26
private predicate shouldPrint ( Locatable e ) { any ( PrintAstConfiguration config ) .shouldPrint ( e ) }
Original file line number Diff line number Diff line change 1
- #-----| [MacroRole] #freestanding(expression)
2
- #-----| [MacroRole] #freestanding(expression)
3
- #-----| [MacroRole] #freestanding(expression)
4
- #-----| [MacroRole] #freestanding(expression)
5
- #-----| [MacroRole] #freestanding(expression)
6
- #-----| [MacroRole] #freestanding(expression)
7
- #-----| [MacroRole] #freestanding(expression)
8
- #-----| [MacroRole] #freestanding(expression)
9
- #-----| [MacroRole] #freestanding(declaration)
10
- #-----| [MacroRole] #freestanding(declaration)
11
1
closures.swift:
12
2
# 1| [NamedFunction] hello()
13
3
# 1| InterfaceType = () -> String
Original file line number Diff line number Diff line change 1
- #-----| [MacroRole] #freestanding(expression)
2
- #-----| [MacroRole] #freestanding(expression)
3
- #-----| [MacroRole] #freestanding(expression)
4
- #-----| [MacroRole] #freestanding(expression)
5
- #-----| [MacroRole] #freestanding(expression)
6
- #-----| [MacroRole] #freestanding(expression)
7
- #-----| [MacroRole] #freestanding(expression)
8
- #-----| [MacroRole] #freestanding(expression)
9
- #-----| [MacroRole] #freestanding(declaration)
10
- #-----| [MacroRole] #freestanding(declaration)
11
1
v5.8.swift:
12
2
# 1| [Comment] // https://github.com/apple/swift/blob/main/CHANGELOG.md#swift-58
13
3
# 1|
Original file line number Diff line number Diff line change 1
- #-----| [MacroRole] #freestanding(expression)
2
- #-----| [MacroRole] #freestanding(expression)
3
- #-----| [MacroRole] #freestanding(expression)
4
- #-----| [MacroRole] #freestanding(expression)
5
- #-----| [MacroRole] #freestanding(expression)
6
- #-----| [MacroRole] #freestanding(expression)
7
- #-----| [MacroRole] #freestanding(expression)
8
- #-----| [MacroRole] #freestanding(expression)
9
- #-----| [MacroRole] #freestanding(declaration)
10
- #-----| [MacroRole] #freestanding(declaration)
11
1
cfg.swift:
12
2
# 1| [TopLevelCodeDecl] { ... }
13
3
# 1| getBody(): [BraceStmt] { ... }
You can’t perform that action at this time.
0 commit comments