Commit Graph

12 Commits

Author SHA1 Message Date
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
John McCall d5a36321b9 Reorganize the parsing of decl groups / function definitions so that
declarators are parsed primarily within a single function (at least for
these cases).  Remove some excess diagnostics arising during parse failures.

llvm-svn: 85924
2009-11-03 19:26:08 +00:00
Chris Lattner d98e7cf7c1 improve the diagnostic for uses of the GCC "global variable in a register" extension.
This implements rdar://6880449 - improve diagnostic for usage of "global register variable" GCC extension

llvm-svn: 71599
2009-05-12 21:44:00 +00:00
Chris Lattner 14bdb78430 fix a valgrind problem I noticed while developing another patch,
if a decl is invalid, it isn't added to the Decls array, so we
need to pass in Decls.size() to avoid reading uninit memory.

llvm-svn: 68913
2009-04-12 20:51:10 +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
Sebastian Redl a2b5e31cb1 Diagnose declarations that don't declare anything, and fix PR3020.
Examples:
int;
typedef int;

llvm-svn: 61454
2008-12-28 15:28:59 +00:00
Chris Lattner 4fc69799f5 Rewrite FindDiagnostics to be more strict about the formatting of the
expected-foo strings.  Now the only allowed characters between 
expected-error and {{  is whitespace.

llvm-svn: 59925
2008-11-24 01:28:17 +00:00
Douglas Gregor 556877c1e6 This patch adds very basic support for parsing and type-checking class
inheritance in C++. It'll parse the base-specifier list, e.g.,

 class D : public B1, virtual public B2 { };

and do some of the simpler semantic checks (B1 and B2 are classes;
they aren't unions or incomplete types, etc).

llvm-svn: 49623
2008-04-13 21:30:24 +00:00
Chris Lattner 81cb9e8637 Fix PR2017 and silence some bogus errors.
llvm-svn: 49068
2008-04-02 01:05:10 +00:00
Chris Lattner 5e4c75f4ef rename -parse-ast-print to -ast-print
rename -parse-ast-dump to -ast-dump
remove -parse-ast, which is redundant with -fsyntax-only

llvm-svn: 42852
2007-10-11 00:18:28 +00:00
Ted Kremenek 0883fd5817 Removed option "-parse-ast-check" from clang driver. This is now implemented
using "-parse-ast -verify".

Updated all test cases (using a sed script) that invoked -parse-ast-check to
now use -parse-ast -verify.

Fixed a bug where using "-verify" instead of "-parse-ast-check" would not
correctly create the DiagClient needed to accumulate diagnostics.

llvm-svn: 42365
2007-09-26 20:14:22 +00:00
Chris Lattner 02c0439a44 Fix a couple of bugs, add some new cool stuff.
1. Fix a todo in Parser::ParseTag, to recover better.  On code like
   that in test/Sema/decl-invalid.c it causes us to return a single
   error instead of multiple.
2. Fix an error in Sema::ParseDeclarator, where it would crash if the
   declarator didn't have an identifier.  Instead, diagnose the problem.
3. Start adding infrastructure to track the range of locations covered
   by a declspec or declarator.  This is mostly implemented for declspec,
   but could be improved, it is missing for declarator.

Thanks to Neil for pointing out this crash.

llvm-svn: 40482
2007-07-25 00:24:17 +00:00