[clang-tidy] Fix a false positive in the make_pair checker if an argument has a explicit template argument.

This required a rather ugly workaround for a problem in ASTMatchers where
callee() is only overloaded for Stmt and Decl but not for Expr.

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@213509 91177308-0d34-0410-b5e6-96231b3b80d8
[clang-tidy] Add a check for RAII temporaries.

Summary:
This tries to find code similar that immediately destroys
an object that looks like it's trying to follow RAII.
  {
    scoped_lock(&global_mutex);
    critical_section();
  }

This checker will have false positives if someone uses this pattern
to legitimately invoke a destructor immediately (or the statement is
at the end of a scope anyway). To reduce the number we ignore this
pattern in macros (this is heavily used by gtest) and ignore objects
with no user-defined destructor.

Reviewers: alexfh, djasper

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@213647 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r213647; the added test triggers an assertion.


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