ahatanak added a comment. Can this attribute be used on c++ template methods? Is the following code valid? template<class T> struct S { T foo(int a) __attribute__((alloc_align(1))); }; https://reviews.llvm.org/D29599