[PATCH] D25937: [Sema] -Wunused-variable warning for variables with array types should behave similarly to variables with scalar types

2016-10-27 Thread Alex Lorenz via cfe-commits
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

[PATCH] D25937: [Sema] -Wunused-variable warning for variables with array types should behave similarly to variables with scalar types

2016-10-26 Thread John McCall via cfe-commits
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 __

[PATCH] D25937: [Sema] -Wunused-variable warning for variables with array types should behave similarly to variables with scalar types

2016-10-26 Thread Alex Lorenz via cfe-commits
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

[PATCH] D25937: [Sema] -Wunused-variable warning for variables with array types should behave similarly to variables with scalar types

2016-10-25 Thread John McCall via cfe-commits
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

[PATCH] D25937: [Sema] -Wunused-variable warning for variables with array types should behave similarly to variables with scalar types

2016-10-25 Thread Alex Lorenz via cfe-commits
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