Commit Graph

7 Commits

Author SHA1 Message Date
Richard Smith c5b0552055 Fix parsing of type-specifier-seq's. Types are syntactically allowed to be
defined here, but not semantically, so

  new struct S {};

is always ill-formed, even if there is a struct S in scope.

We also had a couple of bugs in ParseOptionalTypeSpecifier caused by it being
under-loved (due to it only being used in a few places) so merge it into
ParseDeclarationSpecifiers with a new DeclSpecContext. To avoid regressing, this
required improving ParseDeclarationSpecifiers' diagnostics in some cases. This
also required teaching ParseSpecifierQualifierList about constexpr... which
incidentally fixes an issue where we'd allow the constexpr specifier in other
bad places.

llvm-svn: 152549
2012-03-12 07:56:15 +00:00
Daniel Dunbar 8fbe78f6fc Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
   which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
   can be useful to redefine what gets run as 'clang -cc1' (for example, to set
   a default target).

llvm-svn: 91446
2009-12-15 20:14:24 +00:00
Daniel Dunbar a45cf5b6b0 Rename clang to clang-cc.
Tests and drivers updated, still need to shuffle dirs.

llvm-svn: 67602
2009-03-24 02:24:46 +00:00
Chris Lattner 7b0ec8a9df upgrade various 'implicit int' warnings from an ext-warn to warning when not
in C89 mode.  This makes it enabled by default instead of only enabled with
-pedantic.  Clang defaults to c99 mode, so people will see this more often
than with GCC, but they can always use -std=c89 if they really want c89.

llvm-svn: 65647
2009-02-27 18:53:28 +00:00
Chris Lattner 03c4041cb5 make the 'to match this' diagnostic a note.
llvm-svn: 59921
2008-11-23 23:17:07 +00:00
Steve Naroff e78e2af754 Tweak test...
llvm-svn: 46946
2008-02-11 02:16:41 +00:00
Steve Naroff 326389b8ce Fix http://llvm.org/bugs/show_bug.cgi?id=1988.
Sema::CheckInitializerListTypes() needs to ignore invalid structures.

llvm-svn: 46942
2008-02-11 00:06:17 +00:00