Commit Graph

120 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis 26da1f46e4 Add a Parser::Diag overload that can receive a custom string along with a SourceRange.
llvm-svn: 55283
2008-08-24 12:51:04 +00:00
Chris Lattner f440440616 make sure that ParseAST invokes the action for end of translation unit.
llvm-svn: 55222
2008-08-23 03:19:52 +00:00
Chris Lattner 9e8c057ab7 add action to know about end of translation unit.
llvm-svn: 55218
2008-08-23 02:06:50 +00:00
Chris Lattner ce90ef51b9 we already have a handle on the 'in' keyword, don't bother getting two.
llvm-svn: 55217
2008-08-23 02:02:23 +00:00
Chris Lattner 2cc35ae286 minor cleanup, remove finalize method.
llvm-svn: 55216
2008-08-23 02:00:52 +00:00
Daniel Dunbar 12c9ddced1 Change Parser & Sema to use interned "super" for comparions.
- Added as private members for each because it is not clear where to
   put the common definition. Perhaps the IdentifierInfos all of these
   "pseudo-keywords" should be collected into one place (this would
   KnownFunctionIDs and Objective-C property IDs, for example).

Remove Token::isNamedIdentifier.
 - There isn't a good reason to use strcmp when we have interned
   strings, and there isn't a good reason to encourage clients to do
   so.

llvm-svn: 54794
2008-08-14 22:04:54 +00:00
Daniel Dunbar c74b5cc2bc More #include cleaning
- Drop Diagnostic.h from DeclSpec.h, move utility Diag methods into
   implementation .cpp

llvm-svn: 54626
2008-08-11 03:45:03 +00:00
Chris Lattner 197a301669 Fix rdar://6124613 a crash on invalid code.
llvm-svn: 54340
2008-08-05 06:19:09 +00:00
Daniel Dunbar 4983df37a7 Add more Parser/Sema support for GCC asm-label extension.
- ActOnDeclarator now takes an additional parameter which is the
   AsmLabel if used. Its unfortunate that this bubbles up this high,
   but we cannot just lump it in as an attribute without mistakenly
   *accepting* it as an attribute.
 - The actual asm-label itself is, however, encoded as an AsmLabelAttr
   on the FunctionDecl.
 - Slightly improved parser error recovery on malformed asm-labels.
 - CodeGen support still missing...

llvm-svn: 54339
2008-08-05 01:35:17 +00:00
Chris Lattner 9acd2f1cd2 add a new diag helper that takes a range.
llvm-svn: 54081
2008-07-26 00:16:04 +00:00
Chris Lattner cf31de3760 Make Declarator::getDeclSpec() return a const reference to avoid
cases where mutation can introduce bugs.  Propagate around 'const'.

llvm-svn: 52772
2008-06-26 06:49:43 +00:00
Argyrios Kyrtzidis 7bbb20e338 Add parsing support for C++ classes.
Note that Parser::ParseCXXMemberSpecification is temporarily disabled until the Sema support is in place.
Once ParseCXXMemberSpecification is enabled, the Parser/cxx-class.cpp test will pass.

llvm-svn: 52694
2008-06-24 22:12:16 +00:00
Argyrios Kyrtzidis e6aff3db25 K&R-style functions not allowed in C++.
llvm-svn: 52575
2008-06-21 10:00:56 +00:00
Mike Stump 01e07653d4 Test commit to see if new account works.
I choose to remove extraneous whitespace at end of lines as a semantic
nop for the test.

llvm-svn: 52503
2008-06-19 19:28:49 +00:00
Chris Lattner a120a521a5 Fix a couple crashes on invalid input.
llvm-svn: 51622
2008-05-27 23:32:43 +00:00
Eli Friedman 2460b0c941 Fix the scope of K&R-style argument declarations so that they don't
extend beyond the end of the function.

I'm not completely sure this is the right way to fix this bug, so 
someone familiar with the parser should double-check.

llvm-svn: 51311
2008-05-20 09:10:20 +00:00
Chris Lattner aa9c7aed0f Add support for C++ default arguments, and rework Parse-Sema
interaction for function parameters, fixing PR2046.

Patch by Doug Gregor!

llvm-svn: 49369
2008-04-08 04:40:51 +00:00
Chris Lattner 9d51f2b9d4 Fix handling of implicit int, resolving PR2012 and reverting (and
subsuming) my patch for PR1999.

llvm-svn: 49251
2008-04-05 06:32:51 +00:00
Chris Lattner 94fc8063b4 Step #1 to fixing PR2012: c89 allows declspecs to be completely
missing from function definitions only.  If we see a function 
definiton with missing declspecs, just fudge in an int.

llvm-svn: 49250
2008-04-05 05:52:15 +00:00
Chris Lattner 7a51313d8a Make a major restructuring of the clang tree: introduce a top-level
lib dir and move all the libraries into it.  This follows the main
llvm tree, and allows the libraries to be built in parallel.  The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in.  This speeds
up parallel builds, particularly incremental ones.

llvm-svn: 48402
2008-03-15 23:59:48 +00:00