summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* [driver] Do not add -kext to the link command line when compiling with Chad Rosier2011-08-251-17/+0
| | | | | | | -fapple-kext. Fixes <rdar://problem/10013310>. Reverts <rdar://problem/7809940>. llvm-svn: 138564
* Remove a bogus assertion from the AST reader, which assumed thatDouglas Gregor2011-08-251-12/+6
| | | | | | | | | | redeclarations of a particular entity would occur in source order. Friend declarations that occur within class templates (or member classes thereof) do not follow this, nor would modules. Big thanks to Erik Verbruggen for reducing this problem from the Very Large Qt preamble testcase he found. llvm-svn: 138557
* Use the module manager's search facility to look for methods with aDouglas Gregor2011-08-251-47/+88
| | | | | | | | | given selector, rather than walking the chain backwards. Teach its visitor how to merge multiple result sets into a single result set, combining the results of selector lookup in several different modules into a single result set. llvm-svn: 138556
* [analyzer] Move the leak bugs from CFRefCount to RetainReleaseChecker, with ↵Jordy Rose2011-08-251-50/+56
| | | | | | a level of indirection to handle GC vs. non-GC. llvm-svn: 138538
* [analyzer] MacOSKeychainAPIChecker: Cleanup AllocationState structure.Anna Zaks2011-08-251-11/+10
| | | | llvm-svn: 138535
* Add support for Microsoft __ptr32 keyword. Francois Pichet2011-08-252-2/+10
| | | | | | Patch by Chris Cudmore! llvm-svn: 138533
* [analyzer] Move the easy bug types from CFRefCount to RetainReleaseChecker.Jordy Rose2011-08-251-41/+28
| | | | | | (These bug types may have just been leaked before...!) llvm-svn: 138532
* [analyzer] MacOSKeychainAPIChecker: Add the custom BugReport visitor(which ↵Anna Zaks2011-08-251-11/+16
| | | | | | highlights the allocation site) to all the relevant reports within the checker. llvm-svn: 138531
* [analyzer] Move the RetainSummaryManager from CFRefCount to ↵Jordy Rose2011-08-251-29/+34
| | | | | | | | RetainReleaseChecker. Because Checkers live for an entire translation unit, this persists summary caches across multiple code bodies and avoids repeated initialization (but probably at the cost of memory). This removes the last references from RetainReleaseChecker to CFRefCount. llvm-svn: 138529
* blocks - capturing logic of byref block variable's expression Fariborz Jahanian2011-08-251-1/+17
| | | | | | | statement initializer makes safe assumption when a substatement is encounterred (with a fix me). llvm-svn: 138528
* [analyzer] Better fix for the "missing return" error, from Ted.Jordy Rose2011-08-241-3/+3
| | | | llvm-svn: 138526
* [analyzer] Silence another incorrect warning ("control reaches end of ↵Jordy Rose2011-08-241-0/+3
| | | | | | non-void function") llvm-svn: 138510
* [analyzer] Remove experimental FIXME that never actually applied to the code ↵Jordy Rose2011-08-241-2/+0
| | | | | | in trunk. llvm-svn: 138508
* [analyzer] CFRefReport and friends no longer depend on CFRefCount.Jordy Rose2011-08-241-39/+46
| | | | llvm-svn: 138506
* Remove long-dead FIXMEDouglas Gregor2011-08-241-2/+0
| | | | llvm-svn: 138498
* [analyzer] Do not use references in std::pair.Anna Zaks2011-08-241-4/+4
| | | | llvm-svn: 138497
* Don't force the complete deserialization of the visible-declarationsDouglas Gregor2011-08-245-76/+1
| | | | | | | | | | table when serializing an AST file. This was a holdover from the days before chained PCH, and is a complete waste of time and storage now. It's a good thing it's useless, because I have no idea how I would have implemented MaterializeVisibleDecls efficiently in the presence of modules. llvm-svn: 138496
* [analyzer] Unbreak the release buildbot.Anna Zaks2011-08-241-2/+1
| | | | llvm-svn: 138493
* Introduce a depth-first search of modules into the module manager,Douglas Gregor2011-08-241-24/+97
| | | | | | | | | | | | which supports both pre-order and post-order traversal via a visitor mechanism. Use this depth-first search with a post-order traversal to give predictable ordering semantics when walking all of the lexical declarations in the translation unit. Eventually, module imports will occur in the source code rather than at the beginning, and we'll have to revisit this walk. llvm-svn: 138490
* Follow up to r138470 (Add PNaCl TargetInfo). I've occasionally submitted ↵Ivan Krasin2011-08-241-1/+6
| | | | | | wrong patch. llvm-svn: 138489
* [analyzer] MacOSKeychainAPIChecker: Provide reacher diagnostic trace by ↵Anna Zaks2011-08-241-18/+73
| | | | | | pointing to the allocation site when reporting a leak. llvm-svn: 138479
* [analyzer] Silence an (incorrect) uninitialized variable warning, caught by ↵Jordy Rose2011-08-241-1/+2
| | | | | | Cameron. llvm-svn: 138477
* [analyzer] Copy GC mode setting from CFRefCount to RetainReleaseChecker in ↵Jordy Rose2011-08-241-20/+46
| | | | | | | | preparation for getting rid of CFRefCount. This is a little hacky for now but will get better once we decide the best way to handle this. llvm-svn: 138476
* Silence 'may be used uninitialized' warnings.Argyrios Kyrtzidis2011-08-241-2/+2
| | | | llvm-svn: 138475
* [analyzer] Allow checker writes to specify that no region should be ↵Anna Zaks2011-08-241-0/+4
| | | | | | accosiated with the report. (Useful when we report an error on endOfPath or deadSymbols, when the range of the last expression might have nothing to do with the error.) llvm-svn: 138474
* Add PNaCl TargetInfo.Ivan Krasin2011-08-241-0/+72
| | | | llvm-svn: 138470
* [analyzer] Remove unused DoNothingByRef and the special case for ↵Jordy Rose2011-08-241-13/+2
| | | | | | | | CFDictionaryCreate. This is a very small regression (actually introduced in r138309) because it won't catch leaks of objects passed by reference to CFDictionaryCreate (they're considered to have escaped and are ignored). If this is important we can put in a specific eval::Call to restore the functionality. llvm-svn: 138464
* In the AST reader, switch name lookup within a DeclContect over to theDouglas Gregor2011-08-242-119/+126
| | | | | | | | | | | | | | | | | | module DAG-based lookup scheme. This required some reshuffling, so that each module stores its own mapping from DeclContexts to their lexical and visible sets for those DeclContexts (rather than one big "chain"). Overall, this allows simple qualified name lookup into the translation unit to gather results from multiple modules, with the lookup results in module B shadowing the lookup results in module A when B imports A. Walking all of the lexical declarations in a module DAG is still a mess; we'll end up walking the loaded module list backwards, which works fine for chained PCH but doesn't make sense in a DAG. I'll tackle this issue as a separate commit. llvm-svn: 138463
* [analyzer] Slightly clean up the fix in 138432, so that it doesn't depend on ↵Jordy Rose2011-08-241-20/+41
| | | | | | the relative ordering of path-sensitive and path-insensitive checks. Still not ideal, but I think a real fix would require infrastructure that doesn't exist yet. llvm-svn: 138462
* Thread safety: Fix a few typos in last commit -- use LockID instead of Lock ↵Caitlin Sadowski2011-08-241-14/+14
| | | | | | in comments and start a couple methods with a lowercase letter llvm-svn: 138460
* Match LLVM change: TargetRegistry and TargetSelect have been moved to Support.Evan Cheng2011-08-241-1/+1
| | | | llvm-svn: 138451
* Reset FirstID (first diagnostic's file ID) to allow for invocations of the ↵Axel Naumann2011-08-241-1/+3
| | | | | | VerifyDiagnosticsClient on several input files. llvm-svn: 138434
* [analyzer] Fix a Heisenbug concerning object lifetimes with a hack. ↵Jordy Rose2011-08-241-1/+26
| | | | | | Hopefully a better fix coming soon. See comment for more details. llvm-svn: 138432
* [analyzer] Reapply 138390 "Clean up unused bits of CFRefCount", reverted in ↵Jordy Rose2011-08-241-11/+1
| | | | | | 138405. Ended up unrelated to any problems. llvm-svn: 138431
* [analyzer] Fix potential crasher with RAII. No functionality change. (No ↵Jordy Rose2011-08-241-38/+50
| | | | | | test because this particular circumstance requires an impossible series of events, but this is future-proofing.) llvm-svn: 138430
* [analyzer] Reapply 138382 and 138388 (reverted in 138419 and 138420). The ↵Jordy Rose2011-08-241-102/+80
| | | | | | issue seems to have been with the uninitialized variable fixed in 138424; a fix for another Heisencrasher coming soon. llvm-svn: 138426
* [analyzer] Correctly initialize a variable and hopefully fix crashes.Jordy Rose2011-08-241-1/+1
| | | | llvm-svn: 138424
* Revert "[analyzer] Cleanup: Move temporary declarations of CFRefCount ↵Eric Christopher2011-08-241-11/+13
| | | | | | | | variables closer to their uses. No functionality change." This reverts commit d02b4af7bd6ca4a743c7074d64e205d718aa221d. llvm-svn: 138420
* Revert "[analyzer] Make CFRefBug and CFRefReportVisitor not dependent on ↵Eric Christopher2011-08-241-69/+89
| | | | | | | | CFRefCount. Unfortunately, CFRefReport still is. No functionality change." This reverts commit e3fb7e428b7ba0d5d902dfe3f165d70e09b03a15. llvm-svn: 138419
* Make constant aggregate constant initializers private linkage.Eric Christopher2011-08-241-1/+1
| | | | | | | | | After talking with John making this the case for all of these is the right way to go. Fixes rdar://9804564 and PR10414 llvm-svn: 138418
* [analyzer] MacOSKeychainAPIChecker: Add reasoning about functions which ↵Anna Zaks2011-08-241-18/+59
| | | | | | MIGHT deallocate the memory region allocated with SecKeychain APIs. Specifically, when the buffer is passed to CFStringCreateWithBytesNoCopy along with a custom deallocator, which might potentially correctly release the memory. llvm-svn: 138417
* [analyzer] MacOSKeychainAPIChecker: Retrieve the memory region which we are ↵Anna Zaks2011-08-231-2/+8
| | | | | | tracking even when it's no longer a SymbolicRegion, for example, when it is cast to char*. llvm-svn: 138415
* Move creation of the deallocation mismatch report into a separate function ↵Anna Zaks2011-08-231-15/+32
| | | | | | for future reuse. llvm-svn: 138414
* Whitespace and 80-col cleanup.Eric Christopher2011-08-231-3/+2
| | | | llvm-svn: 138413
* objc - fix up the builtin type for objc_assign_ivar.Fariborz Jahanian2011-08-231-1/+5
| | | | | | // rdar://9362887. llvm-svn: 138412
* Fix _mm256_shuffle_ps mask! Example, for mask=203, Instead of:Bruno Cardoso Lopes2011-08-231-1/+1
| | | | | | | | <i32 3, i32 2, i32 8, i32 11, i32 3, i32 6, i32 12, i32 15> generate: <i32 3, i32 2, i32 8, i32 11, i32 7, i32 6, i32 12, i32 15> llvm-svn: 138411
* Start reworking -Wunreachable-code. The original analysis had serious flaws ↵Ted Kremenek2011-08-232-181/+216
| | | | | | | | | | with how it handled SCC's of dead code, or simply having false negatives by overly suppressing warnings. WIP. llvm-svn: 138410
* CFG: record set of C++ 'try' dispatch blocks, which could be of interest to ↵Ted Kremenek2011-08-231-2/+2
| | | | | | various analyses (e.g., reachability). llvm-svn: 138409
* Constify the result of CFGStmt::getStmt().Ted Kremenek2011-08-236-24/+24
| | | | llvm-svn: 138408
* Revert "[analyzer] Clean up unused bits of CFRefCount."Eric Christopher2011-08-231-1/+11
| | | | | | This reverts commit 6886a92640f5bffc972f67c0a1f302d6c6e7c322. llvm-svn: 138405
OpenPOWER on IntegriCloud