xazax.hun marked an inline comment as done. xazax.hun added inline comments.
================ Comment at: clang/lib/Sema/SemaType.cpp:7424 + ParsedAttr &Attr) { + if (CurType->isFunctionType()) { + State.getSema().Diag(Attr.getLoc(), diag::warn_type_attribute_wrong_type) ---------------- aaron.ballman wrote: > aaron.ballman wrote: > > Is this correct, or should it be `if (!CurType->isFunctionType())`? > I see now that this is only incorrect for the acquire attribute, but not the > other two. I think we might consider it incorrect for the acquire as well. Because if we let the user put acquire on the function, it is ambiguous where to put the annotation. If we do not let them put on the function they are always forced to put on the return type to express this. But in case this kind of ambiguity is a feature and not a bug I can change the behavior. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70469/new/ https://reviews.llvm.org/D70469 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits