def warn_use_of_temp_while_consumed : Warning<
"invocation of method '%0' on a temporary object while it is in the "
"'consumed' state">, InGroup<Consumed>, DefaultIgnore;
-def warn_uniqueness_attribute_wrong_decl_type : Warning<
- "%0 attribute only applies to methods">,
- InGroup<Consumed>, DefaultIgnore;
// ConsumedStrict warnings
def warn_use_in_unknown_state : Warning<
if (!checkAttributeNumArgs(S, Attr, 0)) return;
if (!(isa<CXXMethodDecl>(D) || isa<CXXConstructorDecl>(D))) {
- S.Diag(Attr.getLoc(), diag::warn_uniqueness_attribute_wrong_decl_type) <<
- Attr.getName();
+ S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type)
+ << Attr.getName() << ExpectedMethod;
return;
}
if (!checkAttributeNumArgs(S, Attr, 0)) return;
if (!isa<CXXMethodDecl>(D)) {
- S.Diag(Attr.getLoc(), diag::warn_uniqueness_attribute_wrong_decl_type) <<
- Attr.getName();
+ S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type)
+ << Attr.getName() << ExpectedMethod;
return;
}
if (!checkAttributeNumArgs(S, Attr, 0)) return;
if (!isa<CXXMethodDecl>(D)) {
- S.Diag(Attr.getLoc(), diag::warn_uniqueness_attribute_wrong_decl_type) <<
- Attr.getName();
+ S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type)
+ << Attr.getName() << ExpectedMethod;
return;
}
if (!checkAttributeNumArgs(S, Attr, 0)) return;
if (!isa<CXXMethodDecl>(D)) {
- S.Diag(Attr.getLoc(), diag::warn_uniqueness_attribute_wrong_decl_type) <<
- Attr.getName();
+ S.Diag(Attr.getLoc(), diag::warn_attribute_wrong_decl_type)
+ << Attr.getName() << ExpectedMethod;
return;
}