Index: include/clang/Basic/Attr.td =================================================================== --- include/clang/Basic/Attr.td +++ include/clang/Basic/Attr.td @@ -915,6 +915,11 @@ let Documentation = [LayoutVersionDocs]; } +def Leaf : IgnoredAttr { + let Spellings = [GNU<"leaf">]; + let Subjects = SubjectList<[Function]>; +} + def MaxFieldAlignment : InheritableAttr { // This attribute has no spellings as it is only ever created implicitly. let Spellings = []; Index: test/Sema/attr-leaf.c =================================================================== --- /dev/null +++ test/Sema/attr-leaf.c @@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -verify -fsyntax-only %s +// expected-no-diagnostics + +void f(void) __attribute__((leaf));