Implement DR21

A default template-argument shall not be specified in a friend template
declaration.

Interestingly, we properly handled default template arguments on friend
class members but not on just friend classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184882 91177308-0d34-0410-b5e6-96231b3b80d8
Don't try to get the layout of an invalid decl in getDeclAlign.

When the decl that we're getting alignment for is a FieldDecl, and the field's
parent record is invalid, skip the actual field alignment calculation (and
return 1-byte alignment in the general case).

Also, assert in in getASTRecordLayout that the decl is valid. This was
inspired by PR16292; see also r184581 and r184751.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184883 91177308-0d34-0410-b5e6-96231b3b80d8
PR8302: Check for shadowing a template parameter when declaring a template
template parameter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184884 91177308-0d34-0410-b5e6-96231b3b80d8
Missing test update from r184884.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184885 91177308-0d34-0410-b5e6-96231b3b80d8
Make this test properly test both things it's trying to test.


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