erichkeane added a comment. In https://reviews.llvm.org/D29599#674772, @ahatanak wrote:
> 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))); > }; > Yes it can, however that example will NOT compile. First, on member functions you cannot use alloc_align to refer to the 'this' function. Second, the return value must be a pointer, so if remove_pointer<T> == T, this will fail. https://reviews.llvm.org/D29599 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits