Use the C++11 definition of PODness for __is_pod in C++11 mode.

Keep the old definition for C++98 so we don't break tr1::is_pod.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155754 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Use the C++11 definition of PODness for __is_pod in C++11 mode."

This is just papering over a major bug in isPODType, real fix coming up soon.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155755 91177308-0d34-0410-b5e6-96231b3b80d8
Rename isPODType (using the C++98 rules) into isCXX98PODType and make isPODType decide which one to use based on LangOptions.

- -Wc++98-compat depends on the c++98 definition
- Now __is_pod returns the right thing in c++11 and c++98 mode
- All changes to the type traits test are validated against g++ 4.7

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155756 91177308-0d34-0410-b5e6-96231b3b80d8
C++11 weakens the requirement for types used with offsetof from POD to standard layout type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155757 91177308-0d34-0410-b5e6-96231b3b80d8
isCXX98PODType: Avoid dispatch on the language standard when recursing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155758 91177308-0d34-0410-b5e6-96231b3b80d8
switch some uses of ExpectAndConsume(tok::semi to use ExpectAndConsumeSemi.  This allows
us to improve this diagnostic (telling us to insert another ")":

t.c:2:19: error: expected ';' at end of declaration
  int x = 4+(5-12));
                  ^
                  ;
to:
t.c:2:19: error: extraneous ')' before ';'
  int x = 4+(5-12));
                  ^

...telling us to remove the ")".  This is PR12595.  There are more uses of ExpectAndConsumeSemi
that could be switched over, but I don't hit them on a daily basis :)





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155759 91177308-0d34-0410-b5e6-96231b3b80d8
improve error recovery for extra ')'s after a if/switch/while condition.  Before:

t.c:3:9: error: expected expression
  if (x)) {
        ^

.. which isn't even true - a statement or expression is fine.  After:

t.c:3:9: error: extraneous ')' after condition, expected a statement
  if (x)) {
        ^

This is the second part of PR12595



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155762 91177308-0d34-0410-b5e6-96231b3b80d8
Currently __builtin_annotation() only annotates an i32.

        i32 __builtin_annotation(i32, string);

Applying it to i64 (e.g., long long) generates the following IR.

        trunc i64 {{.*}} to i32
        call i32 @llvm.annotation.i32
        zext i32 {{.*}} to i64

The redundant truncation and extension make the result difficult to use.

This patch makes __builtin_annotation() generic.

        type __builtin_annotation(type, string);

For the i64 example, it simplifies the generated IR to:

        call i64 @llvm.annotation.i64

Patch by Xi Wang!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155764 91177308-0d34-0410-b5e6-96231b3b80d8
[class.copy]p23: Fix an assertion caused by incorrect argument numbering in a
diagnostic, add a test for this paragraph, and tighten up the diagnostic wording
a little.


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