Skip to content

Commit 1ccacc3

Browse files
committed
Address code review comments
1 parent 28e6cc8 commit 1ccacc3

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

clang/include/clang/CIR/Dialect/IR/CIRAttrs.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ def CIR_TypeInfoAttr : CIR_Attr<"TypeInfo", "typeinfo", [TypedAttrInterface]> {
859859
}
860860

861861
//===----------------------------------------------------------------------===//
862-
// CatAllAttr & CatchUnwindAttr
862+
// CatchAllAttr & CatchUnwindAttr
863863
//===----------------------------------------------------------------------===//
864864

865865
// Represents the unwind region where unwind continues or

clang/lib/CIR/CodeGen/CIRGenCleanup.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class EHScope {
4040
class CatchBitFields {
4141
friend class EHCatchScope;
4242
unsigned : NumCommonBits;
43-
4443
unsigned numHandlers : 32 - NumCommonBits;
4544
};
4645

clang/test/CIR/IR/try-catch.cir

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,26 @@ cir.func dso_local @empty_try_block_with_catch_all() {
2424
// CHECK: cir.return
2525
// CHECK: }
2626

27+
cir.func dso_local @empty_try_block_with_catch_unwind() {
28+
cir.scope {
29+
cir.try {
30+
cir.yield
31+
} catch [#cir.unwind {
32+
cir.yield
33+
}]
34+
}
35+
cir.return
36+
}
37+
38+
// CHECK: cir.func dso_local @empty_try_block_with_catch_unwind() {
39+
// CHECK: cir.scope {
40+
// CHECK: cir.try {
41+
// CHECK: cir.yield
42+
// CHECK: } catch [#cir.unwind {
43+
// CHECK: cir.yield
44+
// CHECK: }]
45+
// CHECK: }
46+
// CHECK: cir.return
47+
// CHECK: }
48+
2749
}

0 commit comments

Comments
 (0)