Refactor Matcher<T> and DynTypedMatcher to reduce overhead of casts.

Summary:
This change introduces DynMatcherInterface and changes the internal
representation of DynTypedMatcher and Matcher<T> to use a generic
interface instead.
It removes unnecessary indirections and virtual function calls when
converting matchers by implicit and dynamic casts.
DynTypedMatcher now remembers the stricter type in the chain of casts
and checks it before calling into DynMatcherInterface.
This change improves our clang-tidy related benchmark by ~14%.
Also, it opens the door for more optimizations of this kind that are
coming in future changes.

As a side effect of removing these template instantiations, it also
speeds up compilation of Dynamic/Registry.cpp by ~17% and reduces the
number of
symbols generated by ~30%.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218769 91177308-0d34-0410-b5e6-96231b3b80d8
Adds 'override' to overriding methods. NFC.
These were uncoveredby my yet undelivered patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218774 91177308-0d34-0410-b5e6-96231b3b80d8
Update CGDebugInfo to the updated API in LLVM.
Complex address expressions are no longer part of DIVariable, but
rather an extra argument to the debug intrinsics.

http://reviews.llvm.org/D4919
rdar://problem/17994491

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218777 91177308-0d34-0410-b5e6-96231b3b80d8
Do not use delegated constructors.

Do not use delegated constructors.
It is not supported on all platforms yet.
Fixes build broken by r218769.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218779 91177308-0d34-0410-b5e6-96231b3b80d8
c++ error recovery. Build a valid AST when trying
to recover from parse error parsing the default
argument. Patch prevents crash after spewing 100s 
of errors caused by someone who forgot to compile in c++11
mode. So no test. rdar://18508589 


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218780 91177308-0d34-0410-b5e6-96231b3b80d8
Reverting r218777 while investigating buildbot breakage.
"Update CGDebugInfo to the updated API in LLVM."

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218781 91177308-0d34-0410-b5e6-96231b3b80d8
Update CGDebugInfo to the updated API in LLVM.
Complex address expressions are no longer part of DIVariable, but
rather an extra argument to the debug intrinsics.

http://reviews.llvm.org/D4919
rdar://problem/17994491

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218788 91177308-0d34-0410-b5e6-96231b3b80d8
DIBuilder: Encapsulate DIExpression's element type

Update for corresponding LLVM API change for
`DIBuilder::createExpression()`.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218798 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C Modernizer. Patch to remove dangling space
before the semicolon wahen modernizing to use 
NS_ENUM/NS_OPTIONS macros. rdar://18498539


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218809 91177308-0d34-0410-b5e6-96231b3b80d8
Rename bit_RDRAND to bit_RDRND to match GCC's version of this header.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218823 91177308-0d34-0410-b5e6-96231b3b80d8
Add the various signature macros.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218824 91177308-0d34-0410-b5e6-96231b3b80d8
Fix trailing commas in AMD define.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218825 91177308-0d34-0410-b5e6-96231b3b80d8
Test case for my r218780 patch.
Suggested by Richard Smith.
rdar://18508589.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218830 91177308-0d34-0410-b5e6-96231b3b80d8
Reduce the PR20399 test case.

I couldn't get something /really/ obvious, and I imagine Richard Smith
might be able to provide some text explaining the sequence of steps
that's demonstrated by these files - but at least it's a bit simpler
now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218840 91177308-0d34-0410-b5e6-96231b3b80d8
Merge branch 'master', remote-tracking branch 'trunk/master'