Fix test to not depend on llvm optimizations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207062 91177308-0d34-0410-b5e6-96231b3b80d8
When two templates get merged together, also merge their pattern declarations
together. This is extremely hairy, because in general we need to have loaded
both the template and the pattern before we can determine whether either should
be merged, so we temporarily violate the rule that all merging happens before
reading a decl ends, but *only* in the case where a template's pattern is being
loaded while loading the template itself.

In order to accomodate this for class templates, delay loading the injected
class name type for the pattern of the template until after we've loaded the
template itself, if we happen to load the template first.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207063 91177308-0d34-0410-b5e6-96231b3b80d8
Don't leak objects in load-from-ast path unless DisableFree is set.

Also update a comment to match a code change that was done in r110978.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207065 91177308-0d34-0410-b5e6-96231b3b80d8
compeltions are never appropriate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207066 91177308-0d34-0410-b5e6-96231b3b80d8
More spellchecking for Index.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207067 91177308-0d34-0410-b5e6-96231b3b80d8
Fix 3 test-only leaks found by LSan.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207068 91177308-0d34-0410-b5e6-96231b3b80d8
Revert the "don't leak" part of r207065, looks like the bots don't like it :-/
http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/22506


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207070 91177308-0d34-0410-b5e6-96231b3b80d8
Fix four more test-only leaks found by LSan.

Tool::run() doesn't take ownership of the passed action.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207071 91177308-0d34-0410-b5e6-96231b3b80d8
Fix two leaks in c-index-test found by LSan.

The result of clang_getCursorSpelling() needs to be clang_getCursorSpelling()ed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207073 91177308-0d34-0410-b5e6-96231b3b80d8
Fix two test-only leaks found by LSan.

The result of getBufferForFile() must be freed.
(Should we change functions that expect the caller to assume ownership so
that they return unique_ptrs instead? Then the type system makes sure we get
this right.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207074 91177308-0d34-0410-b5e6-96231b3b80d8
Fix two leaks found by LSan (one is test-only).

The result of llvm::MemoryBuffer::getMemBuffer() needs to be freed. Don't
pass "don't free" flag to overrideFileContents() to fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207075 91177308-0d34-0410-b5e6-96231b3b80d8
Fix two leaks found by LSan.

A CursorPlatformAvailability can have several "unavailable" attributes, don't
leak all but the first.  I'm not sure if there can be several "deprecate"ds too,
but add the same logic there to keep the two code paths looking the same.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207076 91177308-0d34-0410-b5e6-96231b3b80d8
Don't leak invalid RegexDirectives. Probably a small part of PR19520.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207077 91177308-0d34-0410-b5e6-96231b3b80d8
Don't leak _all_ directives in -verify mode. Found by LSan, PR19520.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207079 91177308-0d34-0410-b5e6-96231b3b80d8
Simplify leak fix of r207076, by just disposing the previous CXString.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207081 91177308-0d34-0410-b5e6-96231b3b80d8
Comment to XML conversion: use unique_ptr for SimpleFormatContext


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207087 91177308-0d34-0410-b5e6-96231b3b80d8
[mips] Correct size_t and ptrdiff_t for N32.

Summary:
Correct size_t to be unsigned int and ptrdiff_t to be signed long. The types were the correct size before this change but
the exact type matters for name mangling and exception handling in C++.

Reviewers: atanasyan

Reviewed By: atanasyan

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207093 91177308-0d34-0410-b5e6-96231b3b80d8
CommentToXMLConverter: Don't use "default" to method(s). It is unavailable in msc17.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207107 91177308-0d34-0410-b5e6-96231b3b80d8
AArch64: update tests to new way of printing NEON lists.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207117 91177308-0d34-0410-b5e6-96231b3b80d8
[mips] Support 128-bit int in N32 ABI by overriding TargetInfo::hasInt128Type()

Summary: The condition in the base class is rather strange. It says a target has the 128-bit integer type if the size of a pointer is >= 64-bits. N32 has 32-bit pointers but 64-bit integers. I'm a bit reluctant to change this for all targets so this patch makes the method virtual and overrides it for MIPS64.

Reviewers: atanasyan

Reviewed By: atanasyan

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207121 91177308-0d34-0410-b5e6-96231b3b80d8