Make Sema::CollectMultipleMethodsInGlobalPool() public.

It's useful for out-of-tree clients to be able to query the global
Objective-C method pool, and only Sema can do that right now.


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@221744 91177308-0d34-0410-b5e6-96231b3b80d8
Fix this code to follow the coding style regarding anonymous namespaces and
static functions. Make a bunch of file-local functions static. Remove one
unused static function revealed by this.


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@221745 91177308-0d34-0410-b5e6-96231b3b80d8
PR21536: Fix a corner case where we'd get confused by a pack expanding into the
penultimate parameter of a template parameter list, where the last parameter is
itself a pack, and build a bogus empty final pack argument.


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@221748 91177308-0d34-0410-b5e6-96231b3b80d8
Instantiate exception specifications when instantiating function types (other
than the type of a function declaration). We previously didn't instantiate
these at all! This also covers the pathological case where the only mention of
a parameter pack is within the exception specification; this gives us a second
way (other than alias templates) to reach the horrible state where a type
contains an unexpanded pack, but its canonical type does not.


This is a re-commit of r219977:

r219977 was reverted in r220038 because it hit a wrong-code bug in GCC 4.7.2.
(That's gcc.gnu.org/PR56135, and affects any implicit lambda-capture of
'this' within a template.)


r219977 was a re-commit of r217995, r218011, and r218053:

r217995 was reverted in r218058 because it hit a rejects-valid bug in MSVC.
(Incorrect overload resolution in the presence of using-declarations.)
It was re-committed in r219977 with a workaround for the MSVC rejects-valid.

r218011 was a workaround for an MSVC parser bug. (Incorrect desugaring of
unbraced range-based for loop).


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