Skip to content

Commit 596679a

Browse files
committed
[llvm][Stmt]:git clang format
1 parent f0bdeb4 commit 596679a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

clang/lib/Sema/SemaStmt.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -717,6 +717,14 @@ bool Sema::checkMustTailAttr(const Stmt *St, const Attr &MTA) {
717717
return false;
718718
}
719719

720+
if (const FunctionDecl *CalleeDecl = CE->getDirectCallee()) {
721+
if (CalleeDecl->hasAttr<NotTailCalledAttr>()) {
722+
Diag(St->getBeginLoc(), diag::err_musttail_conflicts_with_not_tail_called)
723+
<< &MTA;
724+
return false;
725+
}
726+
}
727+
720728
if (const auto *EWC = dyn_cast<ExprWithCleanups>(E)) {
721729
if (EWC->cleanupsHaveSideEffects()) {
722730
Diag(St->getBeginLoc(), diag::err_musttail_needs_trivial_args) << &MTA;

0 commit comments

Comments
 (0)