Skip to content

Commit 2f18960

Browse files
committed
Modified version-3
1 parent abedbaf commit 2f18960

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clang/lib/Sema/SemaStmt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ bool Sema::checkMustTailAttr(const Stmt *St, const Attr &MTA) {
719719

720720
if (const FunctionDecl *CalleeDecl = CE->getDirectCallee();
721721
CalleeDecl && CalleeDecl->hasAttr<NotTailCalledAttr>()) {
722-
Diag(St->getBeginLoc(), diag::err_musttail_mismatch) << CalleeDecl;
722+
Diag(St->getBeginLoc(), diag::err_musttail_mismatch) << true << CalleeDecl;
723723
return false;
724724
}
725725

clang/test/Sema/attr-musttail.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ int __attribute__((not_tail_called)) foo1(int a) {
77

88
int foo2(int a) {
99
[[clang::musttail]]
10-
return foo1(a); // expected-error{{cannot perform a tail call to function'foo1' because its signature is incompatible with the calling function}}
10+
return foo1(a); // expected-error {{cannot perform a tail call to function 'foo1' because its signature is incompatible with the calling function}}
1111
}
1212

1313
int main() {

0 commit comments

Comments
 (0)