Skip to content

Commit f5cbf0e

Browse files
mention possible extension
1 parent 8824e6c commit f5cbf0e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libc/spec/spec.td

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,11 @@ class FunctionAttr<string style, string attr> {
180180
// - "cxx11" is for C++11-style attributes: [[...]]
181181
// - "declspec" is for Microsoft-style attributes: __declspec(...)
182182
string Style = style;
183+
184+
// For the time being, we are only interested in identifer-like attributes.
185+
// We can extend this to support function-like attributes if needed.
186+
// For example, in the future, we can #define __LIBC_ATTRIBUTE_NODISCARD(...) [[nodiscard(__VA_ARGS__)]]
187+
// int FunctionLike = 0;
183188
}
184189
class GnuFunctionAttr<string attr> : FunctionAttr<"gnu", attr> {}
185190
class Cxx11FunctionAttr<string attr, string namespace> : FunctionAttr<"cxx11", attr> {

0 commit comments

Comments
 (0)