comparison clang/test/Sema/attr-leaf.c @ 221:79ff65ed7e25

LLVM12 Original
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 15 Jun 2021 19:15:29 +0900
parents
children c4bab56944e8
comparison
equal deleted inserted replaced
220:42394fc6a535 221:79ff65ed7e25
1 // RUN: %clang_cc1 -verify -fsyntax-only %s
2
3 void f1() __attribute__((leaf));
4
5 void f2() __attribute__((leaf("abc"))); // expected-error {{'leaf' attribute takes no argument}}
6
7 int var __attribute__ ((leaf())); // expected-warning {{'leaf' attribute only applies to functions}}
8
9 // FIXME: Might diagnose a warning if leaf attribute is used in function definition
10 // The leaf attribute has no effect on functions defined within the current compilation unit
11 __attribute__((leaf)) void f3() {
12 }