summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Rework the way we find locally-scoped external declarations when weDouglas Gregor2009-03-026-92/+182
| | | | | | | | | | | need them to evaluate redeclarations or call a function that hasn't already been declared. We now keep a DenseMap of these locally-scoped declarations so that they are not visible but can be quickly found, e.g., when we're looking for previous declarations or before we go ahead and implicitly declare a function that's being called. Fixes PR3672. llvm-svn: 65792
* Add BLOCK_HAS_DESCRIPTOR to global blocks.Anders Carlsson2009-03-011-1/+2
| | | | llvm-svn: 65788
* Be sure to mark blocks with no imports as being global.Mike Stump2009-03-011-0/+4
| | | | llvm-svn: 65784
* simplify some code.Chris Lattner2009-03-011-9/+5
| | | | llvm-svn: 65782
* Fix <rdar://problem/6248764> parser rejects: bad receiver type 'CFStringRef'.Steve Naroff2009-03-011-1/+1
| | | | | | Downgrade an error to a warning (for GCC compatibility). llvm-svn: 65779
* Fix PR3509 by providing correct starting locations for initializer listsDouglas Gregor2009-03-011-11/+11
| | | | llvm-svn: 65777
* Fix <rdar://problem/6619539> incompatible pointer types sending ↵Steve Naroff2009-03-012-26/+35
| | | | | | | | | 'XCElementSpacer *', expected 'XCElement *' (not handling protocol signatures correctly?). - Reworked ASTContext::canAssignObjCInterfaces(). - Added ObjCProtocolDecl::lookupProtocolNamed(). llvm-svn: 65773
* Rename AnonTypedRegion to TypedViewRegion.Ted Kremenek2009-03-015-17/+17
| | | | llvm-svn: 65764
* Adjust wording of bug names.Ted Kremenek2009-03-011-8/+8
| | | | llvm-svn: 65763
* Obj-C non fragile ABI: Use GetClassGlobal in one more instance I missed.Daniel Dunbar2009-03-011-12/+1
| | | | llvm-svn: 65762
* Obj-C non fragile ABI: Add GetInterfaceEHType for getting the Obj-CDaniel Dunbar2009-03-011-3/+73
| | | | | | | exception typeinfo metadata, and a few other EH related types/functions. - No functionality change. llvm-svn: 65761
* NeXT: Unify code for creating a class global.Daniel Dunbar2009-03-011-85/+27
| | | | | | - No functionality change. llvm-svn: 65760
* ObjCAtCatchStmt's ParamStmt is always a DeclStmt.Daniel Dunbar2009-03-013-4/+4
| | | | llvm-svn: 65759
* Remove debugging code.Anders Carlsson2009-03-011-2/+0
| | | | llvm-svn: 65753
* Emit errors about unsupported blocks features.Anders Carlsson2009-03-011-0/+41
| | | | llvm-svn: 65751
* Initialize NSConcreteStackBlockAnders Carlsson2009-03-011-2/+2
| | | | llvm-svn: 65749
* Do some blocks cleanup and simplification. Fix a crash, and add a test case.Anders Carlsson2009-03-013-16/+48
| | | | llvm-svn: 65746
* "This patch uses the new ObjCImplDecl class to merge ↵Chris Lattner2009-03-012-78/+35
| | | | | | | | | | | | | | Sema::ImplMethodsVsClassMethods and Sema::ImplCategoryMethodsVsIntfMethods methods. And now, when clang check a class implementation to find unimplemented methods, it also checks all methods from the class extensions (unnamed categories). There is also a test case to check this warning. This patch contains also a minor update for ObjCImplDecl . getNameAsCString and getNameAsString now returns an empty string instead of crashing for unnamed categories." Patch by Jean-Daniel Dupas! llvm-svn: 65744
* Whoops, actually remove the VLA/VM check in FinalizeDeclaratorGroup.Anders Carlsson2009-02-281-36/+0
| | | | llvm-svn: 65737
* Fix invalid VLAs/VMs in Sema::ActOnVariableDeclarator, so that the variable ↵Anders Carlsson2009-02-281-0/+36
| | | | | | | | | | | will have the right type by the time the initializer is checked. This ensures that code like int a[(int)(1.0 / 1.0) = { 1 } will work. Eli, please review. llvm-svn: 65725
* Remove PrevFunctionScope slot (it isn't needed)...use getParent() instead.Steve Naroff2009-02-282-7/+3
| | | | llvm-svn: 65718
* Revert 65707 (causes stack memory to be referenced after it is released).Ted Kremenek2009-02-281-3/+3
| | | | llvm-svn: 65717
* Obscure code gen bug related to sending Fariborz Jahanian2009-02-284-7/+40
| | | | | | | message to 'super' in a class method declared in cateogy (darwin specific). llvm-svn: 65709
* Fix a crash in test/Parser/control-scope.c that testrunner didn'tChris Lattner2009-02-281-1/+1
| | | | | | | | notice because it was a negative test with a fix suggested by Jean-Daniel Dupas. Convert the test from a negative to a positive test to catch stuff like this. llvm-svn: 65708
* remove static ctor.Chris Lattner2009-02-281-3/+3
| | | | llvm-svn: 65707
* improve compatibility with the VC++'08 C++ compiler. Patch byChris Lattner2009-02-283-8/+9
| | | | | | Niklas Larsson! llvm-svn: 65706
* fix inverted conditional, rdar://6633188Chris Lattner2009-02-281-1/+1
| | | | llvm-svn: 65704
* "This patch addresses two FIXME on ObjCCategoryImplDecl:Chris Lattner2009-02-281-56/+6
| | | | | | | | | | | | | /// FIXME: Like ObjCImplementationDecl, this should not be a NamedDecl! /// FIXME: Introduce a new common base class for ObjCImplementationDecl and ObjCCategoryImplDecl It adds an IndentifierInfo ivar to the ObjCCategoryImplDecl, so it can inherits from Decl and not NamedDecl (I'm not sure about the memory management of this ivar). And now that both ObjCImplementationDecl and ObjCCategoryImplDecl have the same super classes, it allow creation of a common base class: ObjCImplDecl" Patch by Jean-Daniel Dupas! llvm-svn: 65703
* brain thinking memcpy, fingers thinking memset :)Chris Lattner2009-02-281-2/+2
| | | | llvm-svn: 65701
* after going around in circles a few times, finally cave and emit structureChris Lattner2009-02-281-2/+11
| | | | | | | | copies with memcpy instead of memmove. This matches what GCC does and if it causes a problem with a particular libc we can always fix it with a target hook. llvm-svn: 65699
* TargetInfo::validateAsmConstraint now takes a reference to the full ↵Anders Carlsson2009-02-282-11/+11
| | | | | | constraints string. This will make it possible to support multi-character constraints. No functionality change (for now). llvm-svn: 65696
* Minor name change (move the ObjC prefix to a more appropriate place).Steve Naroff2009-02-283-4/+4
| | | | llvm-svn: 65695
* Fix <rdar://problem/6451399> problems with labels and blocks.Steve Naroff2009-02-286-19/+64
| | | | | | | | | - Move the 'LabelMap' from Sema to Scope. To avoid layering problems, the second element is now a 'StmtTy *', which makes the LabelMap a bit more verbose to deal with. - Add 'ActiveScope' to Sema. Managed by ActOnStartOfFunctionDef(), ObjCActOnStartOfMethodDef(), ActOnBlockStmtExpr(). - Changed ActOnLabelStmt(), ActOnGotoStmt(), ActOnAddrLabel(), and ActOnFinishFunctionBody() to use the new ActiveScope. - Added FIXME to workaround in ActOnFinishFunctionBody() (for dealing with C++ nested functions). llvm-svn: 65694
* First cut CodeGen support for __block variables.Mike Stump2009-02-285-76/+129
| | | | llvm-svn: 65688
* Check a few more kinds of declarations that make a scope.Eli Friedman2009-02-281-0/+3
| | | | llvm-svn: 65680
* Start of checking for gotos which jump to an illegal destination. Eli Friedman2009-02-282-2/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | As far as I know, this catches all cases of jumping into the scope of a variable with a variably modified type (excluding statement expressions) in C. This is missing some stuff we probably want to check (other kinds of variably modified declarations, statement expressions, indirect gotos/addresses of labels in a scope, ObjC @try/@finally, cleanup attribute), the diagnostics aren't very good, and it's not particularly efficient, but it's a decent start. This patch is a slightly modified version of the patch I attached to PR3259, and it fixes that bug. I was sort of planning on improving it, but I think it's okay as-is, especially since it looks like CodeGen doesn't have any use for this sort of data structure. The only significant change I can think of from the version I attached to PR3259 is that this version skips running the checking code when a function doesn't contain any labels. This patch doesn't cover case statements, which also need similar checking; I'm not sure how we should deal with that. Extending the goto checking to also check case statements wouldn't be too hard; it's just a matter of keeping track of the scope of the closest switch and checking that the scope of every case is the same as the scope of the switch. That said, it would likely be a performance hit to run this check on every function (it's an extra pass over the entire function), so we probably want some other solution. llvm-svn: 65678
* Fix obvious shortcoming in the implementations of Evaluate for Eli Friedman2009-02-281-3/+19
| | | | | | integer __real__ and __imag__. Not sure how I missed this. llvm-svn: 65677
* Eliminate CXXRecordTypeDouglas Gregor2009-02-2813-85/+66
| | | | llvm-svn: 65671
* Add a FIXME for something I can't look at just yetDouglas Gregor2009-02-281-0/+2
| | | | llvm-svn: 65669
* Template instantiation for function typesDouglas Gregor2009-02-283-6/+85
| | | | llvm-svn: 65668
* Alignment of pointers in __objc_classlist must be on theirFariborz Jahanian2009-02-281-0/+2
| | | | | | | natural alignment. Otherwise, the excess hole confuses the objc2 runtime (this is darwin specific). llvm-svn: 65666
* Implement template instantiation for pointer, reference, and (some)Douglas Gregor2009-02-284-370/+422
| | | | | | | | | | | | | array types. Semantic checking for the construction of these types has been factored out of GetTypeForDeclarator and into separate subroutines (BuildPointerType, BuildReferenceType, BuildArrayType). We'll be doing the same thing for all other types (and declarations and expressions). As part of this, moved the type-instantiation functions into a class in an anonymous namespace. llvm-svn: 65663
* Fix enumeration in switch warnings. No behavior change.Eli Friedman2009-02-271-0/+6
| | | | llvm-svn: 65659
* Fix enumeration in switch warnings, plus misc comment changes. No Eli Friedman2009-02-271-2/+41
| | | | | | behavior change. llvm-svn: 65658
* Fix PR3612. We ensure that we add builtins to the GlobalDeclMap andMike Stump2009-02-272-5/+14
| | | | | | | | | we ensure that things added to the module can be found even when they are not in GlobalDeclMap. The later is for increased flexibility, should someone want to do something tricky like extern "Ada" in the same module. llvm-svn: 65657
* Diagnose gc attribute mismatch of property and its ivar.Fariborz Jahanian2009-02-271-0/+12
| | | | llvm-svn: 65656
* Give a code insertion hint for how to fix 'implicit int' warnings and errors.Chris Lattner2009-02-271-2/+6
| | | | llvm-svn: 65653
* Fix a typoDouglas Gregor2009-02-271-1/+1
| | | | llvm-svn: 65652
* When retrieving the location of a Node, for MemberExprs use the location of theTed Kremenek2009-02-271-1/+7
| | | | | | '.' or '->'. llvm-svn: 65651
* In BuildAnonymousStructUnionMemberReference, we shouldn't invalidate OpLoc whenTed Kremenek2009-02-271-1/+0
| | | | | | | | | | building nested member expressions. This location is used to determine the range of the entire expression, and the expression itself already has its location inherited from its Base. This fixes <rdar://problem/6629829>. llvm-svn: 65650
OpenPOWER on IntegriCloud