Fix test to not depend on llvm optimizations.

git-svn-id: http://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: http://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: http://llvm.org/svn/llvm-project/cfe/trunk@207065 91177308-0d34-0410-b5e6-96231b3b80d8