aboutsummaryrefslogtreecommitdiff
path: root/Parse
AgeCommit message (Collapse)Author
2008-03-15Make a major restructuring of the clang tree: introduce a top-levelChris Lattner
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13handle __extension__ properly at block scope.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48332 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13instead of passing in null end location info, pass in the same as start.Chris Lattner
This still isn't right, but is slightly nicer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48331 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13improve DeclStmt to be able to store SourceRange info correctly.Chris Lattner
Set the start of DeclStmt range. Right now the end is meaningless though. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48330 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-10implement simple support for arbitrary token lookahead. Change the Chris Lattner
objc @try parser to use it, fixing a FIXME. Update the objc-try-catch-1.m file to pass now that we get more reasonable errors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48129 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-07Add fastcall/stdcall attribute supportNate Begeman
Generate CallingConv::Fast when fastcall attribute is present git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48017 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03Add a bunch of attributes, patch by Nuno Lopes.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47837 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-29Fix http://llvm.org/bugs/show_bug.cgi?id=2106.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47768 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-29Add support for attribute(deprecated), patch by Nuno Lopes!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47753 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-27Added support for attribute "noreturn."Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47689 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26add parsing, ast building and pretty printing support for C++ throw expressions.Chris Lattner
Patch by Mike Stump! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47582 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-25convert tabs to spaces, patch by Mike Stump!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47560 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-21Handle __attribute__((annotate("string")))Nate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47451 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-21Collect and build and process type attributes on pointers. For Chris Lattner
example, we can now correctly build the type for things like: _AS1 float * _AS2 *B; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47420 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20add a method to AttributeList that converts an identifier to an enum.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47412 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-14ParseCompoundStatementBody expects to only be called with { as the currentChris Lattner
token. Diagnose when the { is missing in objc @try blocks instead of aborting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47130 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-14Remove DeclSpec::Invalid, a recently added bool that allowed the parser to ↵Steve Naroff
detect if the decl spec was invalid. For now, we will stick with the original strategy - clients of Parse::ParseDeclarationSpecifiers() should never have to know this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47104 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-14A much better fix for http://llvm.org/bugs/show_bug.cgi?id=1987.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47103 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-12Allow the parser to detect invalid DeclSpec's. This fixes ↵Steve Naroff
http://llvm.org/bugs/show_bug.cgi?id=1987. This commit only "guards" the call to ParseDeclarationSpecifiers() in ParseDeclarationOrFunctionDefinition(). We could consider guarding all calls, however this is a bit radical (since it effectively stops parsing the declaration once we have a bad declspec). Will discuss with Chris tomorrow. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46984 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-11Several cleanups surrounding Parser::ParseAsmStatement() and ↵Steve Naroff
Parser::FuzzyParseMicrosoftAsmStatement(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46977 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-11Move policy on unnamed fields (a Microsoft extension) from ↵Steve Naroff
Parser::ParseStructDeclaration() to the driver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46974 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-11Move Microsoft __declspec hack from the parser to the preprocessor. Since we ↵Steve Naroff
have no plans to actually implement this construct, it is cleaner to limit the change to the preprocessor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46973 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-10Fix PR1999, by emitting a hard error only if an argument declarator is ↵Chris Lattner
completely missing. Otherwise, it is an implicit int case, which is valid in c90 and invalid elsewhere, but accepted as an extension. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46938 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-09Behave correctly if a constraint expression is invalid.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46910 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-08Use getLogicalLineNumber() in FuzzyParseMicrosoftAsmStatement(), it's more ↵Steve Naroff
general and simplifies the code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46885 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-08Support fuzzy parsing MS line-oriented __asm's that originate from a macro ↵Steve Naroff
(a case where we can't obtain source line info). As the test case indicates, we don't currently support line-oriented asm statements that mix file/macro body tokens. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46878 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-08Put back the top-level asm code; all tests pass now.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46868 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-08Back out 46855 for now, it causes test failures on Darwin.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46867 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07- Add support for fuzzy parsing line-oriented __asm's (yuck).Steve Naroff
- Change handling of __w64 to a built-in macro. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46864 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07Handle top-level asm declarations.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46855 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07Minor cleanup from yesterday's -fms-extension commit. Move __int* MS ↵Steve Naroff
keywords to predefined macros. This removes some of the MS-madness from Parser::ParseDeclarationSpecifiers(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46852 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07Implement -fms-extensions. This allows us to fuzzy parse non-standard MS ↵Steve Naroff
constructs used in "windows.h". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46838 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05Add a FIXME to clarify previous commit/experiment.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46782 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05Handle simple asm statements correctly.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46777 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05Fix Parser::ParseObjCTryStmt() to allow for trailing @-keyword ↵Steve Naroff
statements/expressions. This bug fix is the result of not having 2-token lookahead to recognize specific @-keywords. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46768 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-02Implement support for __extension__ which silences extwarnings in its Chris Lattner
scope. This is part of the fix for PR1966 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46669 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31Fix http://llvm.org/bugs/show_bug.cgi?id=1967.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46616 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31Fix PR1965: missing diagnostics for parameters that are missingChris Lattner
type specifiers. This required updating some (buggy) tests, and the testcase was previously accidentally committed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46603 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-31Remainder of the __builtin_overload feedbackNate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46601 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30On an unexpected @foo keyword, return failure instead of a 'successful' null ↵Chris Lattner
AST. This fixes a segfault on things like @foo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46574 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30Fixed misc. issues raised by Chris L. on @synchronized implementation.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46558 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29AST for @synchronized.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46524 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-29Bunch of type defs, etc. for @synchronized.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46520 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-25Add more support for Apple's "private extern" extension...Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46371 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-25Add support for dispatching an objc message to a variable Chris Lattner
in an initializer list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46367 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-25First half of a fix for the "objc message send in initializer" bug. This onlyChris Lattner
handles message sends with typenames to start with. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46366 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-25Factor a complex predicate out to a helper method.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46365 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-25split the second half of ParseObjCMessageExpression into a new Chris Lattner
ParseObjCMessageExpressionBody method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46363 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-25remove an implemented todoChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46362 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-17Implement basic overload support via a new builtin, __builtin_overload.Nate Begeman
__builtin_overload takes 2 or more arguments: 0) a non-zero constant-expr for the number of arguments the overloaded functions will take 1) the arguments to pass to the matching overloaded function 2) a list of functions to match. The return type of __builtin_overload is inferred from the function whose args match the types of the arguments passed to the builtin. For example: float a; float sinf(float); int sini(int); float b = __builtin_overload(1, a, sini, sinf); Says that we are overloading functions that take one argument, and trying to pass an argument of the same type as 'a'. sini() does not match since it takes and argument of type int. sinf does match, so at codegen time this will turn into float b = sinf(a); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46132 91177308-0d34-0410-b5e6-96231b3b80d8