Sema: Make getPreferredTypeAlign respect alignments specified with an aligned attribute on a typedef

When calculating the preferred alignment of a type, consider if a alignment
attribute came from a typedef declaration.  If one did, do not naturally align
the type.

Patch by Stephan Tolksdorf, with a little tweaking and an additional testcase by me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202088 91177308-0d34-0410-b5e6-96231b3b80d8
AST: Small code cleanup

Move the pointer to be adjacent to the variable instead of the type.

No functional change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202089 91177308-0d34-0410-b5e6-96231b3b80d8
Improve some gtest assertions

As requested during review, compare pointers to NULL explicitly to make what's
going on more clear.

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