summaryrefslogtreecommitdiffstats
path: root/clang/Sema/SemaDecl.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add experimental support for address space qualified types. Address spaceChristopher Lamb2008-02-041-0/+41
| | | | | | qualifiers use the __attribute__((address_space(id))) syntax. llvm-svn: 46691
* Hack Sema::MergeTypeDefDecl() to silently ignore duplicate typedef's in ↵Steve Naroff2008-01-301-0/+20
| | | | | | | | system headers files. A bizarre, non-standard hook that many compilers appear to implement (sigh:-). llvm-svn: 46583
* Add TODO marker so that it is easier to search.Devang Patel2008-01-301-1/+1
| | | | llvm-svn: 46561
* Ignore __aligned__ with zero arguments in addition to __aligned__ with Eli Friedman2008-01-301-3/+6
| | | | | | one argument. Lets stuff using pthread.h compile. llvm-svn: 46559
* Many refinements to Sema::MergeVarDecl(). This routine still needs some ↵Steve Naroff2008-01-301-12/+42
| | | | | | | | re-work to fully handle tentative decls. This includes a fix to bz1908. llvm-svn: 46540
* Use the canonical type when comparing array types so the comparison Eli Friedman2008-01-291-2/+2
| | | | | | doesn't get confused by typedefs. llvm-svn: 46502
* Implement "private extern" on function decls!Steve Naroff2008-01-281-0/+1
| | | | llvm-svn: 46464
* Fix a bug with struct initializers (in Sema::CheckInitializerListTypes()). Steve Naroff2008-01-281-2/+3
| | | | | | | Test case included from bz1948 (thanks Neil!). Also fixed an 80 column violation... llvm-svn: 46430
* Add more support for Apple's "private extern" extension...Steve Naroff2008-01-251-5/+6
| | | | llvm-svn: 46371
* Replace Sema::CheckVariableInitList, CheckConstantInitList, and ↵Steve Naroff2008-01-251-188/+194
| | | | | | | | | | CheckForCharArrayInitializer with CheckInitializerListTypes. The new routine now supports struct/union initializers. This is a modified version of a patch by Eli Friedman. This version passes all of the clang tests and supports vectors:-) Note that Eli and I are still unsatisfied the implementation of CheckInitializerListTypes(). We'd like to find a more elegant implementation. Nevertheless, this is a complex part of the standard (and may be hard to simplify). Since the complexity is localized to this routine, we can iterate without too much disruption:-) llvm-svn: 46339
* Fix a bug recovering from broken code with a goto that Eli reported.Chris Lattner2008-01-251-2/+7
| | | | llvm-svn: 46336
* - Add Sema::CheckStringLiteralInit, Sema::IsStringLiteralInit.Steve Naroff2008-01-221-28/+35
| | | | | | - Use previous hooks to simplify Sema::CheckInitializerTypes()... llvm-svn: 46235
* Sema::CheckInitializerTypes(). Start simpliying and cleaning up...Steve Naroff2008-01-211-4/+8
| | | | llvm-svn: 46234
* Sema::FinalizeDeclaratorGroup(): Tighten up the tentative definition rule ↵Steve Naroff2008-01-181-4/+9
| | | | | | | | when dealing with arrays. Bug submitted by Eli. llvm-svn: 46179
* Sema::FinalizeDeclaratorGroup()...make sure we emit an diagnostic for ↵Steve Naroff2008-01-181-1/+2
| | | | | | tentative definitions with incomplete types. Touch up all test cases that are effected. llvm-svn: 46152
* Sema::MergeFunctionDecl()...make sure diagnostic is accurate (wrt function ↵Steve Naroff2008-01-161-2/+7
| | | | | | declarations/definitions). Patch by Carl Lewis! llvm-svn: 46070
* Fix build issue on cygwin, patch by Sam BishopChris Lattner2008-01-141-2/+4
| | | | llvm-svn: 45977
* Fix crasher when redefining functions. Not 100% pleased with this solution, ↵Steve Naroff2008-01-141-9/+16
| | | | | | but it is clearly an improvement. Will discuss with Chris later. llvm-svn: 45975
* Add first pieces of support for parsing and representing Chris Lattner2008-01-121-0/+21
| | | | | | extern "C" in C++ mode. Patch by Mike Stump! llvm-svn: 45904
* - Teach Expr::isConstantExpr() about InitListExpr's (and offsetof, since I ↵Steve Naroff2008-01-101-37/+34
| | | | | | | | | | noticed it was missing). - Rename CheckInitializer() to CheckInitializerTypes(). - Removed the isStatic argument to CheckInitializerTypes() and all of it's subroutines. Checking for constant expressions is now done separately. - Added CheckForConstantInitializer(). llvm-svn: 45840
* Fix Sema::ActOnDeclarator() to call MergeFunctionDecl for function decls ↵Steve Naroff2008-01-091-8/+8
| | | | | | that aren't in scope. Since C functions are in a flat namespace, we need to give them special treatment (when compared with variables and typedefs). llvm-svn: 45789
* Fix ASTContext::typesAreCompatible to allow for int/enum compatibility (C99 ↵Steve Naroff2008-01-091-1/+3
| | | | | | | | 6.7.2.2p4). Fix Sema::MergeFunctionDecl to allow for function type compatibility (by using the predicate on ASTContext). Function types don't have to be identical to be compatible... llvm-svn: 45784
* Substituted all instances of the string "Objc" for "ObjC". This fixesTed Kremenek2008-01-071-33/+33
| | | | | | | some naming inconsistencies in the names of classes pertaining to Objective-C support in clang. llvm-svn: 45715
* Merge all the 'assignment' diagnostic code into one routine, decloning Chris Lattner2008-01-041-44/+4
| | | | | | | | | | | | | it from several places. This merges the diagnostics, making them more uniform and fewer in number. This also simplifies and cleans up the code. Some highlights: 1. This removes a bunch of very-similar diagnostics. 2. This renames AssignmentCheckResult -> AssignConvertType 3. This merges PointerFromInt + IntFromPointer which were always treated the same. 4. This updates a bunch of test cases that have minor changes to the produced diagnostics. llvm-svn: 45589
* give better diagnostics for converting between function pointer and void*.Chris Lattner2008-01-031-0/+5
| | | | llvm-svn: 45556
* When promoting array to pointer for argument, don't lose type qualifiers.Chris Lattner2008-01-021-2/+4
| | | | llvm-svn: 45510
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-291-2/+2
| | | | | | discussion of this change. llvm-svn: 45410
* Fix the embarassing typo for real this time (- vs _), sorry about breaking ↵Anders Carlsson2007-12-191-5/+10
| | | | | | the tests Steve. llvm-svn: 45202
* Revert Anders r45191 commit...it broke several of the tests.Steve Naroff2007-12-191-9/+5
| | | | llvm-svn: 45199
* Fix an embarassing typo and add some very limited support for the aligned ↵Anders Carlsson2007-12-191-1/+21
| | | | | | attribute. llvm-svn: 45195
* Normalize attribute names if possible so we won't have to do two strcmps for ↵Anders Carlsson2007-12-191-5/+12
| | | | | | every attribute. llvm-svn: 45191
* fix broken assert.Chris Lattner2007-12-191-1/+1
| | | | llvm-svn: 45189
* Fix const propagation bug.Chris Lattner2007-12-181-2/+1
| | | | llvm-svn: 45152
* Sema::ActOnFinishFunctionBody(): Since we no longer synthesize a ↵Steve Naroff2007-12-131-4/+2
| | | | | | FunctionDecl for each method, remove the unconditional initialization to 0 and corresponding comment. llvm-svn: 45008
* TargetInfo no longer includes a reference to SourceManager.Ted Kremenek2007-12-121-6/+15
| | | | | | | | | | | | | | | Moved all clients of Diagnostics to use FullSourceLoc instead of SourceLocation. Added many utility methods to FullSourceLoc to provide shorthand for: FullLoc.getManager().someMethod(FullLoc.getLocation()); instead we have: FullLoc.someMethod(); Modified TextDiagnostics (and related classes) to use this short-hand. llvm-svn: 44957
* split objc pieces of SemaDecl.cpp out into SemaDeclObjC.cppChris Lattner2007-12-121-896/+1
| | | | llvm-svn: 44925
* simplify code now that isConstantExpr really does alwaysChris Lattner2007-12-111-11/+13
| | | | | | return a loc. llvm-svn: 44890
* For @optional unimplemented methods do not issue the warning.Fariborz Jahanian2007-12-111-2/+4
| | | | llvm-svn: 44872
* Change err_undef_protocolref to warn_undef_protocolref (this is consistent ↵Steve Naroff2007-12-111-3/+3
| | | | | | with GCC). llvm-svn: 44840
* Explicitly set the string literal type from "char *" to "constant array of ↵Steve Naroff2007-12-111-0/+4
| | | | | | | | | | | | char". At this point, I am fairly certain the front-end is correct. Unfortunately, the back-end is still unhappy. That said, I've commented out the two lines in globalinit.c that are causing problems. Chris, please have a look...thanks! llvm-svn: 44823
* Add support for initializing char arrays from string literals.Steve Naroff2007-12-101-21/+109
| | | | | | Adapted from a patch by Anders Carlsson. llvm-svn: 44816
* Have Sema::CheckConstantInitList skip semantic analysis when the element ↵Steve Naroff2007-12-071-0/+3
| | | | | | | | | | | | | | | | | | | | type is a record (until we implement the FIXME). This removes a bogus error for the following code... snarofflocal% cat bug.m #import <Foundation/NSGeometry.h> #define NUMHELICOPTERRECTS 5 static NSRect helicopterRects[NUMHELICOPTERRECTS] = { {{27, 0}, {18, 11}}, // Bottom {{0, 8}, {4, 11}}, // Tail {{0, 16}, {50, 1}}, {{22, 5}, {18, 12}}, // Body {{0, 10}, {42, 3}} }; llvm-svn: 44684
* Rewrite 'super' within a class method. This required some minor tweaks to ↵Steve Naroff2007-12-071-1/+1
| | | | | | the front-end. llvm-svn: 44673
* Revert DidWarn change - It won't catch all cases anyway and GCC warns for ↵Anders Carlsson2007-12-051-5/+1
| | | | | | every excess element. Maybe later we can add back the limit and make it smarter. llvm-svn: 44603
* Recognize CompoundLiteralExpr's as valid lvalue's.Steve Naroff2007-12-051-1/+2
| | | | | | Also updated a FIXME in Sema::CheckInitializer()... llvm-svn: 44602
* Simplified setting up Method's scope before generating AST for its nody.Fariborz Jahanian2007-12-041-27/+5
| | | | llvm-svn: 44576
* Handle initializing vector elements correctly. Emit just one warning if ↵Anders Carlsson2007-12-031-4/+18
| | | | | | there are excess initializers, instead of one per initializer. llvm-svn: 44525
* restore these lines, which fixes some regtest failures.Chris Lattner2007-12-021-4/+4
| | | | llvm-svn: 44516
* improve VC++ compatibility, patch by Cédric Venet.Chris Lattner2007-12-021-4/+4
| | | | llvm-svn: 44496
* Yesterday, I simplified how we stream top-level decls.Steve Naroff2007-11-291-22/+0
| | | | | | | After a discussion with Ted, we both came to the conclusion that adding a "HandleTopLevelDeclaration" hook to ASConsumer is far more elegant. The default implementation of HandleTopLevelDeclaration will be responsible for iterating over the ScopedDecl (which has a chain of the decls:-). TODO: Once Ted adds HandleTopLevelDeclaration, make sure TagDecls are chainged appropriately... llvm-svn: 44445
OpenPOWER on IntegriCloud