dougsonos wrote: Thanks for the quick look.
> Ah yeah, I should have noticed that in review: `ActOnX` is generally only > called during parsing, whereas `BuildX` is also called during template > instantiation. I actually do think it might have come up early in one of the giant reviews, but gotten lost amongst the bigger issues. > Also, we _do_ have tests for function templates and generic lambdas, right? > If not, we should definitely add some. Something like: ```c++ template <typename T> void TemplatedFunc(T x) [[clang::nonblocking]] { auto* ptr = new T; // expected-warning {{function with 'nonblocking' attribute must not allocate or deallocate memory}} } template <typename T> auto TemplatedLambda = [](T x) [[clang::nonblocking]] { auto* ptr = new T; // expected-warning {{lambda with 'nonblocking' attribute must not allocate or deallocate memory}} }; void nb9b() [[clang::nonblocking]] { TemplatedFunc(42); // expected-note {{in template expansion here}} TemplatedLambda<int>(42); } ``` ? https://github.com/llvm/llvm-project/pull/116505 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits