mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Stop parsing into IfConfiDecl nodes in the C++ parser
When parsing #if...#endif regions, parse the active clause directly into place in the AST without ever producing an IfConfigDecl instance.
This commit is contained in:
@@ -31,7 +31,7 @@ func bar() {
|
||||
// CHECK-LABEL: (enum_decl{{.*}}trailing_semi "TrailingSemi"
|
||||
enum TrailingSemi {
|
||||
|
||||
// CHECK-LABEL: (enum_case_decl{{.*}}trailing_semi
|
||||
// CHECK-LABEL: (enum_case_decl
|
||||
// CHECK-NOT: (enum_element_decl{{.*}}trailing_semi
|
||||
// CHECK: (enum_element_decl{{.*}}"A")
|
||||
// CHECK: (enum_element_decl{{.*}}"B")
|
||||
@@ -41,7 +41,7 @@ enum TrailingSemi {
|
||||
// CHECK-NOT: (func_decl{{.*}}trailing_semi <anonymous @ 0x{{[0-9a-f]+}}> get for="subscript(_:)"
|
||||
// CHECK: (accessor_decl{{.*}} <anonymous @ 0x{{[0-9a-f]+}}> get for="subscript(_:)"
|
||||
subscript(x: Int) -> Int {
|
||||
// CHECK-LABEL: (pattern_binding_decl{{.*}}trailing_semi
|
||||
// CHECK-LABEL: (pattern_binding_decl{{.*}}
|
||||
// CHECK-NOT: (var_decl{{.*}}trailing_semi "y"
|
||||
// CHECK: (var_decl{{.*}}"y"
|
||||
var y = 1;
|
||||
|
||||
Reference in New Issue
Block a user