[clang-tidy] Make the named parameter check only warn on declarations if a definition is visible.

Summary:
This allows us to copy the parameter name from the definition (as a comment)
or insert /*unused*/ in both places.

Reviewers: alexfh, klimek

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D4772

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@214701 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Fix unnamed parameter comment insertion with multiple parameters.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@214703 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Rewrite a for-range loop in the old style.

Haven't thought that I ever needed to do this, but in this case comparing the
index using pointer arithmetic turns out to be really ugly. It also generates
nasty sign-compare warnings on 32 bit targets.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@214705 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Add check for possibly incomplete switch statements

While clang warns about a possibly incomplete switch statement when
switching over an enum variable and failing to cover all enum values
(either explicitly or with a default case), no such warning is emitted
if a plain integer variable is used as switch variable.

Add a clang-tidy check to diagnose these scenarios.

No fixit hint is provided since there are multiple possible solutions.