SuccessChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. Properly implement 'enum class' parsing. (details)
Commit d6425e2c14370ecb5e2a4be4cfdef65f8ae69bd0 by richard
Properly implement 'enum class' parsing.

The 'class' or 'struct' keyword is only permitted as part of either an
enum definition or a standalone opaque-enum-declaration, not as part of
an elaborated type specifier. We previously failed to diagnose this, and
generally didn't properly implement the restrictions on elaborated type
specifiers for enumeration types.

In passing, also fixed incorrect parsing for enum-bases, which we
previously parsed as a type-name, but are actually a type-specifier-seq.
This matters for cases like 'enum E : int *p;', which is valid as a
Microsoft extension.

Plus some minor parse diagnostic improvements.

Bumped the recently-added ExtWarn for 'enum E : int x;' to be
DefaultError; this is not an intentional extension, so producing an
error by default seems appropriate, but the warning flag to disable it
may still be useful for code written against old Clang. The same
treatment is given here to the diagnostic for 'enum class E x;', which
we similarly have incorrectly accepted for many years. These diagnostics
continue to be suppressed under -fms-extensions and when compiling
Objective-C code. We will need to decide separately whether Objective-C
should follow the C++ rules or the (older) MSVC rules.
The file was modifiedclang/test/SemaObjC/enum-fixed-type.m
The file was modifiedclang/include/clang/Basic/DiagnosticParseKinds.td
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was modifiedclang/test/Parser/cxx0x-ambig.cpp
The file was modifiedclang/test/Parser/cxx0x-decl.cpp
The file was modifiedclang/test/SemaCXX/enum-scoped.cpp
The file was modifiedclang/lib/Parse/ParseTentative.cpp
The file was modifiedclang/include/clang/Parse/Parser.h
The file was modifiedclang/test/SemaTemplate/instantiate-local-class.cpp
The file was modifiedclang/lib/Parse/ParseDecl.cpp
The file was modifiedclang/test/Parser/MicrosoftExtensions.cpp