Skip to content

Commit

Permalink
[clang][Interp][NFC] Small State.cpp refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaederr committed Apr 19, 2023
1 parent c8318b9 commit 70ba243
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions clang/lib/AST/Interp/State.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ void State::addCallStack(unsigned Limit) {

// Use a different note for an inheriting constructor, because from the
// user's perspective it's not really a function at all.
if (auto *CD = dyn_cast_if_present<CXXConstructorDecl>(F->getCallee())) {
if (CD->isInheritingConstructor()) {
addDiag(CallLocation, diag::note_constexpr_inherited_ctor_call_here)
<< CD->getParent();
continue;
}
if (const auto *CD =
dyn_cast_if_present<CXXConstructorDecl>(F->getCallee());
CD && CD->isInheritingConstructor()) {
addDiag(CallLocation, diag::note_constexpr_inherited_ctor_call_here)
<< CD->getParent();
continue;
}

SmallString<128> Buffer;
Expand Down

0 comments on commit 70ba243

Please sign in to comment.