Plug memory leaks.

Most of the changes are mechanic std::unique_ptr insertions. All leaks were
detected by LeakSanitizer.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@213851 91177308-0d34-0410-b5e6-96231b3b80d8
clang-tidy: [use-override] Tweak messages.

It doesn't make sense to suggest 'virtual' as clang-tidy would complain
about that on the next iteration (we are never issuing warnings for the
base function).

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@214063 91177308-0d34-0410-b5e6-96231b3b80d8
Don't warn on NewCallback argument comments, as they are arguments for the
function the callback points to.

Reviewers: djasper

Reviewed By: djasper

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@214307 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Add a checker for code that looks like a delegate constructors but doesn't delegate.

Summary:
class Foo {
  Foo() {
    Foo(42); // oops
  }
  Foo(int);
};

This is valid code but it does nothing and we can't emit a warning in clang
because there might be side effects. The checker emits a warning for this
pattern and also for base class initializers written in this style.

There is some overlap with the unused-rtti checker but they follow different
goals and fire in different places most of the time.

Reviewers: alexfh, djasper

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@214397 91177308-0d34-0410-b5e6-96231b3b80d8
Use CommonOptionsParser in clang-query. This fixes its support of the fixed
compilation database and makes it behave consistently with other clang tools.

Reviewers: klimek, pcc

Reviewed By: pcc

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@214607 91177308-0d34-0410-b5e6-96231b3b80d8
Merge remote-tracking branch 'origin/master'

Conflicts:
	clang-tidy/misc/MiscTidyModule.cpp