ahatanak added a comment.

My question probably wasn't clear, but I wasn't sure how template functions in 
general (not just member functions) should be handled.

I see a warning when the following function is compiled:

  template<class T>
  T  __attribute__((alloc_align(1))) foo0(int a) {
    typedef typename std::remove_pointer<T>::type T2;
    return new T2();
  }
  
  void foo1() {
    foo0<int*>(1);
  }

clang complains that the attribute only applies to functions returning pointers 
or references, but foo0<int*> does return a pointer. Is that intended?


https://reviews.llvm.org/D29599



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to