[PATCH] D70469: [attributes] [analyzer] Add handle related attributes
Gábor Horváth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 6 18:07:23 PST 2019
xazax.hun added inline comments.
================
Comment at: clang/lib/Sema/SemaType.cpp:7412
+ diag::warn_type_attribute_wrong_type_str)
+ << Attr.getAttrName()->getName() << "non-function" << CurType;
+ return;
----------------
aaron.ballman wrote:
> You should be able to pass in `Attr` directly instead of `Attr.getAttrName()->getName()`, I believe. Also, I'd prefer the `non-function` be put into the diagnostic text itself with a `%select` if we need to vary it.
Indeed. But only passing Attr would result in duplicated `'`. I'm reusing the message, so I ended up not changing this part.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70469/new/
https://reviews.llvm.org/D70469
More information about the cfe-commits
mailing list