Abstract the behavior of when to use base-class tail padding.

For fun, I added a comedy "actually obey the C++11 POD rules" option
which nobody is allowed to use.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173744 91177308-0d34-0410-b5e6-96231b3b80d8
Replace AS_MSTypespec with AS_Keyword, for representing any attribute spelled
as a keyword. Rationalize existing attributes to use it as appropriate, and to
not lie about some __declspec attributes being GNU attributes. In passing,
remove a gross hack which was discarding attributes which we could handle. This
results in us actually respecting the __pascal keyword again.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173746 91177308-0d34-0410-b5e6-96231b3b80d8
Don't crash while printing APValues that are lvalues casted to a
decidedly non-reference, non-pointer type. Fixes <rdar://problem/13090123>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173747 91177308-0d34-0410-b5e6-96231b3b80d8
Actually remove the hack which was blocking the Borland-style attributes from
working, and add the missing attribute spellings. This brings _pascal,
_fastcall, _stdcall and _cdecl to life in -fborland-extensions mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173749 91177308-0d34-0410-b5e6-96231b3b80d8
Treat alignas and _Alignas as keyword attributes. This allows us to
pretty-print them properly (modulo the more general badness in alignment
attribute printing).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173752 91177308-0d34-0410-b5e6-96231b3b80d8
Test that we print MS keyword attributes without a __declspec(...) adornment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173754 91177308-0d34-0410-b5e6-96231b3b80d8
Fold tests for C++ 'main' into a single file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173756 91177308-0d34-0410-b5e6-96231b3b80d8
PR15100: look through type sugar when determining whether we have one of the
forms of 'main' which we accept as an extension.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173758 91177308-0d34-0410-b5e6-96231b3b80d8
Modify the tests for the (sorted) order that the attributes come out as now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173762 91177308-0d34-0410-b5e6-96231b3b80d8
Add a test case for attribute print.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173765 91177308-0d34-0410-b5e6-96231b3b80d8
PR15017: A '>' can appear after a type-specifier in a template-argument-list.
It turns out that there's no correctness bug here (because we can't have a type
definition in this location), but there was a diagnostic bug.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173766 91177308-0d34-0410-b5e6-96231b3b80d8
Propagate the spelling list index for an attribute across template instantiation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173768 91177308-0d34-0410-b5e6-96231b3b80d8
C++11 status:
 * Mark 'sequence points' as done now we have a warning for unsequenced operations
 * Mark 'memory model' as done now we correctly model bitfield operations


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173771 91177308-0d34-0410-b5e6-96231b3b80d8
Implement C++11 [dcl.align]p1 and C11 6.7.5/2 rules for alignas and _Alignas.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173779 91177308-0d34-0410-b5e6-96231b3b80d8
Remove empty lines before "}".

Those empty lines waste vertical whitespace and almost never
increase readability.

Before:
void f() {
  DoSomething();

}

After:
void f() {
  DoSomething();
}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173785 91177308-0d34-0410-b5e6-96231b3b80d8
Reverting changes from r173785 (removing empty lines before "}").

This needs some more thinking, e.g. for namespaces, chains of if-else
if, ...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173787 91177308-0d34-0410-b5e6-96231b3b80d8
Downgrade 'attribute ignored when parsing type' from error to warning, to match
the diagnostic's warn_ name. Switch some places (notably C++11 attributes)
which really wanted an error over to a different diagnostic. Finally, suppress
the diagnostic entirely for __ptr32, __ptr64 and __w64, to avoid producing
diagnostics in important system headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173788 91177308-0d34-0410-b5e6-96231b3b80d8
Produce a diagnostic if alignas is applied to an expression. Neither C11 nor
C++11 allows that.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173789 91177308-0d34-0410-b5e6-96231b3b80d8
Test update missed in r173789.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173790 91177308-0d34-0410-b5e6-96231b3b80d8
Add a diagnostic for an OpenCL kernel with a pointer pointer argument.
Also refactor the surrounding code a little.


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