Skip to content

Commit 34f0c4c

Browse files
Apply suggestions from code review
1 parent e837ec6 commit 34f0c4c

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

lib/Interpreter/CppInterOp.cpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,16 +1139,14 @@ namespace Cpp {
11391139
continue;
11401140
}
11411141
Decl* D = *(stack_begin.back());
1142-
if (D->getKind() == clang::Decl::Field) {
1143-
if (auto* FD = llvm::dyn_cast<FieldDecl>(D)) {
1144-
if (FD->isAnonymousStructOrUnion()) {
1145-
if (auto* CXXRD = llvm::dyn_cast_or_null<CXXRecordDecl>(
1146-
FD->getType()->getAs<RecordType>()->getDecl())) {
1147-
stack_begin.back()++;
1148-
stack_begin.push_back(CXXRD->field_begin());
1149-
stack_end.push_back(CXXRD->field_end());
1150-
continue;
1151-
}
1142+
if (auto* FD = llvm::dyn_cast<FieldDecl>(D)) {
1143+
if (FD->isAnonymousStructOrUnion()) {
1144+
if (auto* CXXRD = llvm::dyn_cast_or_null<CXXRecordDecl>(
1145+
FD->getType()->getAs<RecordType>()->getDecl())) {
1146+
stack_begin.back()++;
1147+
stack_begin.push_back(CXXRD->field_begin());
1148+
stack_end.push_back(CXXRD->field_end());
1149+
continue;
11521150
}
11531151
}
11541152
}

0 commit comments

Comments
 (0)