aboutsummaryrefslogtreecommitdiff
path: root/Sema/SemaDecl.cpp
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-15move the ASTContext argument to be first in the argument list of Chris Lattner
all Create methods. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48398 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15Switch over functiondecl. This makes it obvious that the ASTContextChris Lattner
argument to Create should be first, not last. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48397 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15switch the VarDecl allocation model to go through ASTContext.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48396 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15start switching decls over to using an allocator controlled by ASTContext. Chris Lattner
Right now only some ctors are switched over. I need to switch them all over so I can change the dtor over. This lets us experiment with region allocation and other things in the future. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48390 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-14Correctly error on arrays with automatic storage full of objects with Nate Begeman
non-default address space, and fix comment. Add a test for this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48366 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-14ISO/IEC TR 18037 Nate Begeman
An address space name cannot be used to qualify an object that has automatic storage duration. Still not catching ASQual'd allocas of array type, just scalars at the moment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48350 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-07Patch by Nuno Lopes:Ted Kremenek
Added more comments for code processing attribute "format". Added more checks for corner cases, test cases, and warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48011 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-05remove the source location arguments to various target query methods.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47954 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-05Remove the first layer of support for "portability" warnings. This is Chris Lattner
theoretically useful, but not useful in practice. It adds a bunch of complexity, and not much value. It's best to nuke it. One big advantage is that it means the target interfaces will soon lose their SLoc arguments and target queries can never emit diagnostics anymore (yay). Removing this also simplifies some of the core preprocessor which should make it slightly faster. Ted, I didn't simplify TripleProcessor, which can now have at most one triple, and can probably just be removed. Please poke at it when you have time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47930 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-04The operand to the visibility attribute is required to be a quoted string, ↵Chris Lattner
not a bare identifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47893 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-03Only allow a "noreturn" attribute to be affixed to a FunctionDecl.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47844 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-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 parsing of attributes for functions.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47693 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-26Fix PR2092 by making sure the sign of the enum value follows the Chris Lattner
sign of its type in the early exit case. No testcase, because this doesn't manifest as a failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47581 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-21Correctly handle address space qualifiers in declspecs. This Chris Lattner
allows us to correctly handle stuff like: _AS1 float *B; and to reject stuff like: _AS1 _AS2* x; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47417 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20rename some methods.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47414 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20Use getKind() in HandleDeclAttribute instead of decoding the string inline.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47413 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-20Alternate address spaces work:Chris Lattner
rename QualType::getQualifiers to getCVRQualifiers. Add some fixme's and clean up some code relevant to qualifiers. Change ASQualType to contain a Type* instead of a QualType. Any CVR qualifiers should be on the outer qual type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47398 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-17Turn handling of parameter attributes back on, fixing the ObjC breakageNate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47246 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-17Revert this temporarily, it's breaking objc :/Nate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47245 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-17Handle parameter attributesNate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47243 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-17Fix PR2042. One remaining issue: we don't currently diagnoseChris Lattner
int foobar(int); int foobar() {} which requires ifdef'ing out a testcase in predefined-function.c. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47236 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-16Better handling of the aligned attribute.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47216 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-16Fix CheckEndOfDirective to diagnose lines that contain macros that expand to Chris Lattner
zero tokens. This fixes PR2045, thanks to Neil for finding another incredibly subtle corner case :) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47203 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-16Fix typoAnders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47199 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-16Handle packed attribute correctlyAnders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47197 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Don't call non-existent method... sorry about the spam; the fix seemed Eli Friedman
trivial, but I forgot that method doesn't exist yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47175 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Get rid of unused variable warning.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47174 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Split out incomplete arrays from VariableArrayType into Eli Friedman
IncompleteArrayType. This should make code dealing with both incomplete and variable length arrays much more readable, plus it allows properly making the distinction between isVariableArrayType() and isVariablyModifiedType(). The patch is a little big, but it's strightforward. so I don't think there should be any issues. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47165 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Part of clearing up the whole VariableArrayType + incomplete arrays Eli Friedman
thing. Some cleanups that can be done independently of the fix. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47158 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Get rid of AttributeList in the AST and use the new Attr class insteadAnders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47155 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-15Get rid of outdated code that masks type errors. Fixes PR2036.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47154 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-12Fix unsafe static cast...Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46980 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-11After yesterday's discussion ↵Steve Naroff
(http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-February/001044.html), decided not to change the semantics of Type::isIncompleteType(). This commit simply changes a couple comments to reflect this decision. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46970 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-11Add a comment/FIXME to an earlier change.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46947 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-11Fix http://llvm.org/bugs/show_bug.cgi?id=1988.Steve Naroff
Sema::CheckInitializerListTypes() needs to ignore invalid structures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46942 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-08Improve diagnostic for illegal array initialization.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46869 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-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-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-06inform astconsumer about tagdecls as they are defined.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46788 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-05simplify some code.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46774 91177308-0d34-0410-b5e6-96231b3b80d8