summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Extend the implicit declaration and checking against out-of-scopeDouglas Gregor2009-02-242-104/+163
| | | | | | | | | | | | | external declarations to also support external variable declarations. Unified the code for these two cases into two new subroutines. Note that we fail to diagnose cases like the one Neil pointed out, where a visible non-external declaration hides an external declaration by the same name. That will require some reshuffling of name lookup. llvm-svn: 65385
* retain/release checker:Ted Kremenek2009-02-241-70/+38
| | | | | | | | | | | | - For autorelease pool tracking, keep information about the stack of pools separate from their contents. Also, keep track of the number of times an autorelease pool will send the "release" message to an object when the pool is destroyed. - Update CFRefCount::Update to return a new state instead of a reference count binding. This will allow us to implement more complicated semantics with autorelease pools. llvm-svn: 65384
* Fix IRgen of constant expressions referring to external/staticDaniel Dunbar2009-02-241-5/+8
| | | | | | | variables. - PR3657. llvm-svn: 65381
* Some initial Obj-C zero cost EH support.Daniel Dunbar2009-02-241-5/+134
| | | | | | | | | - Only handles cases with @try with no @catch blocks, and there are a number of problems with the implementation. Nevertheless, this is good enough to handled @synchronized correctly, and some other basic uses. llvm-svn: 65378
* Add a note about an IRgen optimization opportunity.Daniel Dunbar2009-02-241-1/+7
| | | | llvm-svn: 65376
* Fix PR3635 by handling ## magicallyChris Lattner2009-02-241-0/+5
| | | | llvm-svn: 65374
* In C, when we see a function declaration within a local scope, exportDouglas Gregor2009-02-242-1/+76
| | | | | | | | | | that declaration to global scope so that it can be found from other scopes. This allows us to diagnose redeclaration errors for external declarations across scopes. We also warn when name lookup finds such an out-of-scope declaration. This is part of <rdar://problem/6127293>; we'll also need to do the same thing for variables. llvm-svn: 65373
* Prevent accidental copying of CodeGenFunction and CodeGenModule.Anders Carlsson2009-02-242-0/+5
| | | | llvm-svn: 65372
* Pass the CodeGenModule object to GenerateBlockFunction, instead of *this ↵Anders Carlsson2009-02-241-6/+1
| | | | | | | | (which will call the copy constructor). Also, since we're creating a new CodeGenFunction object for each block function, we don't need to clear the BreakContinueStack. llvm-svn: 65371
* Ensure that we can't break or continue out of a block.Mike Stump2009-02-241-0/+5
| | | | llvm-svn: 65370
* Fix <rdar://problem/6611677>: Add basic transfer function support in the staticTed Kremenek2009-02-242-3/+18
| | | | | | | | | analyzer for array subscript expressions involving bases that are vectors. This solution is probably a hack: it gets the lvalue of the vector instead of an rvalue like all other types. This should be reviewed (big FIXME in GRExprEngine). llvm-svn: 65366
* Fix two @synchronized bugs found by inspection: the expression to sychronize ↵Daniel Dunbar2009-02-241-40/+32
| | | | | | | | | on should only be evaluated once, and it is evaluated outside the cleanup scope. Also, lift SyncEnter and SyncExit up in nervous anticipation of x86-64 zero cost EH. llvm-svn: 65362
* Improve merging of function declarations. Specifically:Douglas Gregor2009-02-244-27/+124
| | | | | | | | | | | | | | | | - When we are declaring a function in local scope, we can merge with a visible declaration from an outer scope if that declaration refers to an entity with linkage. This behavior now works in C++ and properly ignores entities without linkage. - Diagnose the use of "static" on a function declaration in local scope. - Diagnose the declaration of a static function after a non-static declaration of the same function. - Propagate the storage specifier to a function declaration from a prior declaration (PR3425) - Don't name-mangle "main" llvm-svn: 65360
* Move PTHStatCache within the anonymous namespace.Ted Kremenek2009-02-231-1/+1
| | | | llvm-svn: 65348
* Tidy up 'ExecutionContinues' to distinguish between jumping to the end of a ↵Ted Kremenek2009-02-231-17/+14
| | | | | | 'method' or 'funciton'. llvm-svn: 65346
* Tidy up the path diagnostic generation logic in BugReporter and remove a ↵Ted Kremenek2009-02-231-50/+53
| | | | | | case where an "Execution continues..." diagnostic could result in an empty message bubble. llvm-svn: 65342
* fix rdar://6611778, a redefinition of an interface was causing anChris Lattner2009-02-232-6/+14
| | | | | | | | assertion when the ivars and method list was reset into the existing interface. To fix this, mark decls as invalid when they are redefined, and don't insert ivars/methods into invalid decls. llvm-svn: 65340
* We should not generate __weak write barrier on indirect referenceFariborz Jahanian2009-02-232-3/+14
| | | | | | | of a pointer to object; This patch does this odd behavior according to gcc. llvm-svn: 65334
* - Generate error for protocol qualifiers on 'Class'.Steve Naroff2009-02-231-2/+6
| | | | | | - Generate error for protocol qualifiers on non-ObjC types. llvm-svn: 65333
* Revert http://llvm.org/viewvc/llvm-project?view=rev&revision=65244.Steve Naroff2009-02-235-58/+2
| | | | | | Remove support for "Class<P>". Will be making this an error. llvm-svn: 65332
* Add copy assignment operator, caught by doug.Chris Lattner2009-02-231-0/+9
| | | | llvm-svn: 65331
* Add more boilerplate logic to more accurately reason about autorelease pools.Ted Kremenek2009-02-231-4/+52
| | | | | | | This doesn't change the current functionality, but better codifies the autorelease pool stack itself. llvm-svn: 65328
* Add low level support for generating invoke instead of calls.Daniel Dunbar2009-02-233-16/+46
| | | | | | - No functionality change. llvm-svn: 65325
* Fix 80 col. violations.Ted Kremenek2009-02-231-2/+4
| | | | llvm-svn: 65322
* Per Chris L.'s suggestion, use getAsFunctionType() instead of ↵Ted Kremenek2009-02-231-5/+7
| | | | | | getDesguaredType(). Constify some pointers along the way. llvm-svn: 65321
* Remove isSuperExpr(), which ignores any casts on 'super'.Steve Naroff2009-02-231-22/+6
| | | | | | | I don't think casting super makes any sense (since it won't effect method lookup). Will discuss with other offline and decide what to do. llvm-svn: 65317
* A few small improvements to Evaluate for stuff I noted in FIXMEs.Eli Friedman2009-02-231-17/+88
| | | | llvm-svn: 65305
* retain/release checker: For now don't track the retain count of NSWindow ↵Ted Kremenek2009-02-231-1/+5
| | | | | | objects (opt for false negatives). llvm-svn: 65304
* Remove typo.Ted Kremenek2009-02-231-1/+1
| | | | llvm-svn: 65302
* '[NSAutoreleasePool addObject:]' has an 'autorelease' effect, not a ↵Ted Kremenek2009-02-231-2/+2
| | | | | | DoNothing effect. llvm-svn: 65301
* Sema::ActOnInstanceMessage(): Tighen up the lookup rules for handling ↵Steve Naroff2009-02-231-9/+31
| | | | | | messages to 'Class'. Also improve "super" handling. llvm-svn: 65300
* Minor cleanup, replace bool with qual_empty().Steve Naroff2009-02-221-3/+1
| | | | llvm-svn: 65293
* Contains the following (related to problems found while investigting ↵Steve Naroff2009-02-223-33/+51
| | | | | | | | | | <rdar://problem/6497631> Message lookup is sometimes different than gcc's). - Implement instance/class overloading in ObjCContainerDecl (removing a FIXME). This involved hacking NamedDecl::declarationReplaces(), which took awhile to figure out (didn't realize replace was the default). - Changed Sema::ActOnInstanceMessage() to remove redundant warnings when dealing with protocols. For now, I've omitted the "protocol" term in the diagnostic. It simplifies the code flow and wan't always 100% accurate (e.g. "Foo<Prot>" looks in the class interface, not just the protocol). - Changed several test cases to jive with the above changes. llvm-svn: 65292
* Make sure to reset the DidCallStackSave variable before emitting a compound ↵Anders Carlsson2009-02-221-0/+1
| | | | | | statement. Fixes PR3649. llvm-svn: 65291
* More objc gc work. Match gcc's treatment of ivar accessFariborz Jahanian2009-02-222-1/+28
| | | | | | | true a local pointer to objective-c object in generating write barriers. llvm-svn: 65290
* Copy some clenaups from Eli to code that I copied. :-)Mike Stump2009-02-221-6/+1
| | | | llvm-svn: 65286
* Cleanp code with some recent suggestions.Mike Stump2009-02-223-21/+12
| | | | llvm-svn: 65285
* A bit of Evaluate cleanup. Also, a full audit of what's missing that Eli Friedman2009-02-221-22/+33
| | | | | | someone would reasonably expect Evaluate to handle for C/ObjC. llvm-svn: 65284
* x86_64 ABI: Actually, we can always pass things we want to pass inDaniel Dunbar2009-02-221-10/+2
| | | | | | | memory using Indirect; this was a holdover from when CGCall wasn't as robust. llvm-svn: 65278
* Fix regression in naming convention derivation: a method only follows the ↵Ted Kremenek2009-02-221-1/+1
| | | | | | copy 'rule' if it doesn't already start with 'init', etc. llvm-svn: 65269
* Eliminate a bunch of code which should be dead.Eli Friedman2009-02-221-194/+5
| | | | llvm-svn: 65267
* x86_64 ABI: Make sure to pass vectors that we want to pass in memoryDaniel Dunbar2009-02-221-1/+1
| | | | | | | | | as byval. Otherwise LLVM will have its own opinion about where to put things. We now pass all gcc dg.compat tests on x86_64. llvm-svn: 65266
* Throw the switch to exclusively use Evaluate (along with the small Eli Friedman2009-02-221-0/+6
| | | | | | | | | | | | | | | | helper isConstantInitializer) to check whether an initializer is constant. This passes tests, but it's possible that it'll cause regressions with real-world code. Future work: 1. The diagnostics obtained this way are lower quality at the moment; some work both here and in Evaluate is needed for accurate diagnostics. 2. We probably need some extra code when we're in -pedantic mode so we can strictly enforce the rules in C99 6.6p7. 3. Dead code cleanup (this should wait until after 2, because we might want to re-use some of the code). llvm-svn: 65265
* x86_64 ABI: Pass 32-bit vectors as Integer to match gcc. We don't careDaniel Dunbar2009-02-221-1/+16
| | | | | | about these much but <2 x i16> shows up in the gcc test suite. llvm-svn: 65264
* x86_64 ABI: Classify <1 x i64> as INTEGER (match gcc not llvm-gcc).Daniel Dunbar2009-02-221-6/+12
| | | | | | | Also, make sure to pass <1 x i64> as i64 (not <1 x i64>, which doesn't quite work yet in the backend). llvm-svn: 65262
* Enhance Evaluate to handle ObjC qualified id and class types; as far as Eli Friedman2009-02-222-4/+10
| | | | | | | | I know, these follow the exact same rules as pointers, so I just made them use the same codepath. Someone more familiar with ObjC should double-check this, though. llvm-svn: 65261
* Fix for PR3433: map __alignof__ to preferred alignment. (This was Eli Friedman2009-02-221-1/+1
| | | | | | partially done in r65258.) llvm-svn: 65260
* Last part of PR3254: use the same alignment computation in Sema and Eli Friedman2009-02-221-4/+1
| | | | | | | CodeGen. I'm not sure whether this actually makes any visible difference, but it's better to be consistent anyway. llvm-svn: 65259
* Improvements to ASTContext::getDeclAlignInBytes; fixes the testcase in Eli Friedman2009-02-222-31/+20
| | | | | | | | | PR3254 and part of PR3433. The isICE changes are necessary to keep the computed results consistent with Evaluate. llvm-svn: 65258
* Remove debugging statement.Steve Naroff2009-02-221-1/+0
| | | | llvm-svn: 65257
OpenPOWER on IntegriCloud