brintos

brintos / llvm-project-archived public Read only

0
0
Text · 770 B · b17947c Raw
16 lines · c
1// RUN: %clang_cc1 -verify -fsyntax-only %s2 3int NotAProtoType(); // expected-note{{add 'void' to the parameter list to turn an old-style K&R function declaration into a prototype}}4int TestCalleeNotProtoType(void) {5  __attribute__((musttail)) return NotAProtoType(); // expected-error{{'musttail' attribute requires that both caller and callee functions have a prototype}}6}7 8int ProtoType(void);9int TestCallerNotProtoType() {                  // expected-note{{add 'void' to the parameter list to turn an old-style K&R function declaration into a prototype}}10  __attribute__((musttail)) return ProtoType(); // expected-error{{'musttail' attribute requires that both caller and callee functions have a prototype}}11}12 13int TestProtoType(void) {14  return ProtoType();15}16