This revision was automatically updated to reflect the committed changes.
Closed by commit rL285289: [Sema] -Wunused-variable warning for array variables
should behave (authored by arphaman).
Changed prior to commit:
https://reviews.llvm.org/D25937?vs=75877&id=76017#toc
Repository:
rL LLVM
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
Please add a line testing the nested-array case to warn-unused-variables.cpp,
but with that, LGTM.
Repository:
rL LLVM
https://reviews.llvm.org/D25937
__
arphaman updated this revision to Diff 75877.
arphaman added a comment.
The updated patch incorporates John's suggestions into code.
Repository:
rL LLVM
https://reviews.llvm.org/D25937
Files:
lib/Sema/SemaDecl.cpp
test/SemaCXX/warn-everthing.cpp
test/SemaCXX/warn-unused-variables.cpp
rjmccall requested changes to this revision.
rjmccall added a comment.
This revision now requires changes to proceed.
There's no reason for this to only consider constant-sized arrays, and you
should use getBaseElementTypeUnsafe() so you look through nested array types.
That method is a no-op o
arphaman created this revision.
arphaman added reviewers: rjmccall, thakis.
arphaman added a subscriber: cfe-commits.
arphaman set the repository for this revision to rL LLVM.
This patch makes the `-Wunused-variable` warning behaviour more consistent: Now
clang won't warn on variables with consta