aaron.ballman closed this revision.
aaron.ballman added a comment.
I've commit in r329904, thank you for the patch!
https://reviews.llvm.org/D45403
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
cpplearner added a comment.
I do not have commit access. Could someone commit the change for me?
https://reviews.llvm.org/D45403
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM!
https://reviews.llvm.org/D45403
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
cpplearner updated this revision to Diff 141880.
cpplearner added a comment.
Removed `ExpectedForMaybeUnused` from AttributeList.h, and removed the entry
for `ExpectedForMaybeUnused` from the `warn_attribute_wrong_decl_type` table
definition.
https://reviews.llvm.org/D45403
Files:
cpplearner added a comment.
In https://reviews.llvm.org/D45403#1062276, @aaron.ballman wrote:
> I don't think we're currently diagnosing static data members of classes as
> being unused in the first place; are there plans to implement that
> functionality so that someone might want to write
aaron.ballman added inline comments.
Comment at: lib/Sema/SemaDeclAttr.cpp:2054
- }
-
// If this is spelled as the standard C++17 attribute, but not in C++17, warn
Quuxplusone wrote:
> @aaron.ballman writes:
> > I don't think we're currently diagnosing
Quuxplusone added inline comments.
Comment at: lib/Sema/SemaDeclAttr.cpp:2054
- }
-
// If this is spelled as the standard C++17 attribute, but not in C++17, warn
@aaron.ballman writes:
> I don't think we're currently diagnosing static data members of classes
aaron.ballman added a comment.
I don't think we're currently diagnosing static data members of classes as
being unused in the first place; are there plans to implement that
functionality so that someone might want to write the attribute there?
Comment at:
cpplearner added inline comments.
Comment at: test/CXX/dcl.dcl/dcl.attr/dcl.attr.unused/p2.cpp:5
int I [[maybe_unused]];
- static int SI [[maybe_unused]]; // expected-warning {{'maybe_unused'
attribute only applies to variables, functions, methods, types, enumerations,
lebedev.ri added inline comments.
Comment at: test/CXX/dcl.dcl/dcl.attr/dcl.attr.unused/p2.cpp:5
int I [[maybe_unused]];
- static int SI [[maybe_unused]]; // expected-warning {{'maybe_unused'
attribute only applies to variables, functions, methods, types, enumerations,
cpplearner created this revision.
cpplearner added reviewers: aaron.ballman, rsmith.
Herald added a subscriber: cfe-commits.
IIUC a static data member is a variable, so [[maybe_unused]] should be allowed
to apply to a static data member.
Repository:
rC Clang
https://reviews.llvm.org/D45403
11 matches
Mail list logo