Commit Graph

14934 Commits

Author SHA1 Message Date
Zhongxing Xu bcbe44fa90 Create only one AnalysisManager for each translation unit. In HandleCode(),
reset the current analysis context of the AnalysisManager.

llvm-svn: 77943
2009-08-03 03:13:46 +00:00
Zhongxing Xu 4f4b643afa Add LocationContext classes to enable creation of cross function
ProgramPoints. ProgramPoints will refer to them in the furture.

llvm-svn: 77941
2009-08-03 02:52:14 +00:00
Daniel Dunbar a8888ac1cb Driver/OpenBSD: Improve ld options.
- Patch by Jonathan Gray!

llvm-svn: 77935
2009-08-03 01:28:59 +00:00
Douglas Gregor 55137cbc85 Produce a warning that partial ordering of function templates is not yet supported
llvm-svn: 77928
2009-08-02 23:46:29 +00:00
Douglas Gregor 9dc8bd327f Keep track of the template arguments deduced when matching a class
template partial specialization. Then, use those template arguments
when instantiating members of that class template partial
specialization. Fixes PR4607.

llvm-svn: 77925
2009-08-02 23:24:31 +00:00
Anders Carlsson 59a9468b22 Whoops, meant to delete this.
llvm-svn: 77916
2009-08-02 21:34:52 +00:00
Anders Carlsson f18318cf4e use CodeGenModule::EmitNullConstant in a couple of places.
llvm-svn: 77915
2009-08-02 21:18:22 +00:00
Anders Carlsson 4ab4f7f416 Use the correct cast kind for dynamic_cast.
llvm-svn: 77905
2009-08-02 19:07:59 +00:00
Douglas Gregor 8a02193931 Update C++ open projects list
llvm-svn: 77901
2009-08-02 18:26:21 +00:00
Douglas Gregor cc17ac0cf2 We have fairly good support for namespaces, now. Namespace aliases are parsed correctly
llvm-svn: 77900
2009-08-02 18:22:38 +00:00
Benjamin Kramer 8b79886e0d Remove duplicated colon.
llvm-svn: 77891
2009-08-02 12:12:11 +00:00
Ted Kremenek 6ddbb4c963 Fix regression caused by recent refactoring where HTML and plist files would not get flushed out when using '-disable-free'.
llvm-svn: 77882
2009-08-02 05:43:14 +00:00
Ted Kremenek 7ac29bb2d8 Include '-o' arguments in verbose output.
llvm-svn: 77881
2009-08-02 05:42:46 +00:00
Chris Lattner c8ed0c16fe linkify IRC
llvm-svn: 77880
2009-08-02 05:38:25 +00:00
Chris Lattner 4758281d64 rearrange side bar, add link to IRC info.
llvm-svn: 77879
2009-08-02 05:36:37 +00:00
Ted Kremenek ca7935d347 Remove RegionViews and RegionCasts. These are no longer used.
llvm-svn: 77876
2009-08-02 05:15:23 +00:00
Ted Kremenek f106ab91ff RegionStoreManager::RemoveDeadBindings() now removes dead 'default' bindings as well.
llvm-svn: 77875
2009-08-02 05:00:15 +00:00
Ted Kremenek cee28a4c4d Generalize the interface of 'StoreManager::RemoveDeadBindings()' to manipulate the entire GRState, not just the Store.
llvm-svn: 77870
2009-08-02 04:45:08 +00:00
Anders Carlsson 44616ce317 Remove old code that was causing the new test to fail.
llvm-svn: 77862
2009-08-02 04:17:43 +00:00
Ted Kremenek 9419876e59 Fix regression in StoreManager::CastRegion() to always treat casts to
'void*' (or 'const void*') as an identity transformation.

llvm-svn: 77860
2009-08-02 04:12:53 +00:00
Anders Carlsson 7df966e040 Don't evaluate inout constraints twice. Fixes PR3800.
llvm-svn: 77854
2009-08-02 03:40:19 +00:00
Daniel Dunbar a4a341b9b0 Compute end_overridden_methods in a way that keeps ENABLE_EXPENSIVE_CHECKS
happy.

llvm-svn: 77850
2009-08-02 01:48:29 +00:00
Daniel Dunbar 4074b93184 Use Twine instead of utostr
llvm-svn: 77848
2009-08-02 01:43:57 +00:00
Daniel Dunbar 36741c8a29 Avoid accessing invalid std::vector element; this makes clang
ENABLE_EXPENSIVE_CHECKS clean on x86_64-.*-darwin10.

llvm-svn: 77831
2009-08-01 23:40:20 +00:00
Daniel Dunbar 6cfaa47c85 lit: Catch (internal) exceptions when using --no-sh.
llvm-svn: 77830
2009-08-01 23:18:27 +00:00
Eli Friedman 62561fe9b0 Fix a minor issue with unions in the new struct building code.
llvm-svn: 77829
2009-08-01 23:11:24 +00:00
Daniel Dunbar 5a283bf848 lit: Fix thinko in finding config file.
llvm-svn: 77828
2009-08-01 23:09:12 +00:00
Eli Friedman 881f9a89d1 Additional AuroraUX header path.
llvm-svn: 77811
2009-08-01 21:46:03 +00:00
Eli Friedman e480ce3d29 Don't error on C++ linkage; if we don't support that, there are
serious issues :)

llvm-svn: 77800
2009-08-01 20:48:04 +00:00
Eli Friedman 2e6da95a60 Add temp C++ include path for AuroraUX; patch by Edward O'Callaghan.
llvm-svn: 77786
2009-08-01 17:10:21 +00:00
Daniel Dunbar 590c358681 lit: Add internal script execution.
- Off by default, you can test it with the --no-sh argument.

 - For me it works for all but 3 tests, but there a number of FIXMEs and QOI
   issues:  
     o Redirection isn't completely accurate -- in practice it can't portably
       be, but I would like to error out if someone writes something which isn't
       going to work. This is the source of the 3 test failures.

     o Some pipe configurations have the potential to deadlock.

     o It is significantly slower when multithreaded. I believe this is due to
       locking happening under the hood, there is probably some kind of solution
       but I haven't investigated yet.

     o Log output is ugly.

llvm-svn: 77784
2009-08-01 10:18:01 +00:00
Daniel Dunbar 82fa6f5e9d lit: Two more sh lex/parse bugs (but its so simple!)
- Empty arguments weren't handled correctly.
 - Escapes outside quoted strings weren't handled.

llvm-svn: 77783
2009-08-01 09:41:09 +00:00
Ted Kremenek 1f22aa7433 This is a fairly large patch, which resulted from a cascade of changes
made to RegionStore (and related classes) in order to handle some
analyzer failures involving casts and manipulation of symbolic memory.

The root of the change is in StoreManager::CastRegion().  Instead of
using ad hoc heuristics to decide when to layer an ElementRegion on a
casted MemRegion, we now always layer an ElementRegion when the cast
type is different than the original type of the region.  This carries
the current cast information associated with a region around without
resorting to the error prone recording of "casted types" in GRState.

Along with this new policy of layering ElementRegions, I added a new
algorithm to strip away existing ElementRegions when they simply
represented casts of a base memory object.  This algorithm computes
the raw "byte offset" that an ElementRegion represents from the base
region, and allows the new ElementRegion to be based off that offset.
The added benefit is that this naturally handles a series of casts of
a MemRegion without building up a set of redundant ElementRegions
(thus canonicalizing the region view).

Other related changes that cascaded from this one (as tests were
failing in RegionStore):

- Revamped RegionStoreManager::InvalidateRegion() to completely remove
  all bindings and default values from a region and all subregions.
  Now invalidated fields are not bound directly to new symbolic
  values; instead the base region has a "default" symbol value from
  which "derived symbols" can be created.  The main advantage of this
  approach is that it allows us to invalidate a region hierarchy and
  then lazily instantiate new values no matter how deep the hierarchy
  went (i.e., regardless of the number of field accesses,
  e.g. x->f->y->z->...).  The previous approach did not do this.

- Slightly reworked RegionStoreManager::RemoveDeadBindings() to also
  incorporate live symbols and live regions that do not have direct
  bindings but also have "default values" used for lazy instantiation.
  The changes to 'InvalidateRegion' revealed that these were necessary
  in order to achieve lazy instantiation of values in the region store
  with those bindings being removed too early.

- The changes to InvalidateRegion() and RemoveDeadBindings() revealed
  a serious bug in 'getSubRegionMap()' where not all region -> subregion
  relationships involved in actually bindings (explicit and implicit)
  were being recorded.  This has been fixed by using a worklist algorithm
  to iteratively fill in the region map.

- Added special support to RegionStoreManager::Bind()/Retrieve() to handle
  OSAtomicCompareAndSwap in light of the new 'CastRegion' changes and the
  layering of ElementRegions.

- Fixed a bug in SymbolReaper::isLive() where derived symbols were not
  being marked live if the symbol they were derived from was also live.
  This fix was critical for getting lazy instantiation in RegionStore
  to work.

- Tidied up the implementation of ValueManager::getXXXSymbolVal() methods
  to use SymbolManager::canSymbolicate() to decide whether or not a
  symbol should be symbolicated.

- 'test/Analysis/misc-ps-xfail.m' now passes; that test case has been
  moved to 'test/Analysis/misc-ps.m'.

- Tweaked some pretty-printing of MemRegions, and implemented
  'ElementRegion::getRawOffset()' for use with the CastRegion changes.

llvm-svn: 77782
2009-08-01 06:17:29 +00:00
Daniel Dunbar 769f940655 Ok, ok, I give in. Fix tests for unused result warning.
llvm-svn: 77780
2009-08-01 06:07:15 +00:00
Ted Kremenek eb01ba670e Temporarily disable out-of-bounds checking. The current checking logic will not work quite right with the changes I'm about to commit.
llvm-svn: 77779
2009-08-01 05:59:39 +00:00
Daniel Dunbar b616260624 Use %S, not `pwd`, and enable a line that *does* work.
- Doug, please check.

llvm-svn: 77778
2009-08-01 05:57:38 +00:00
Daniel Dunbar 1661066e58 lit: Fix two sh lexing bugs.
- '\\\\' inside a "..." string becomes '\\'.
 - The '<' token wasn't being recognized.

llvm-svn: 77777
2009-08-01 05:52:04 +00:00
Daniel Dunbar e65f4de30d 'unset' isn't needed in these tests anymore, we always run with a controlled
environment.

llvm-svn: 77776
2009-08-01 04:51:30 +00:00
Daniel Dunbar dc4a0f7427 lit: Fix a name lookup problem, which only occurred on a race condition. This is
why dynamic binding sucks.

llvm-svn: 77773
2009-08-01 04:11:36 +00:00
Daniel Dunbar 3ee0543e67 lit: Pull a few more variables into the TestingConfig object.
llvm-svn: 77772
2009-08-01 04:06:02 +00:00
Daniel Dunbar 5332311370 lit: Don't use threads when only running one test, or with -j 1.
llvm-svn: 77766
2009-08-01 03:35:40 +00:00
Daniel Dunbar 2653167290 MultiTestRunner: Add 'sh' parsing to ShUtil.
llvm-svn: 77765
2009-08-01 03:22:27 +00:00
Anders Carlsson 1682af5bac More warnings for unused expressions.
llvm-svn: 77763
2009-08-01 01:39:59 +00:00
Mike Stump 183c3d2f59 Add beginnigs of rtti generation, wire up more of -fno-exceptions.
llvm-svn: 77751
2009-07-31 23:15:31 +00:00
Anders Carlsson 1726aaa4fc Remove the old struct builder code.
llvm-svn: 77738
2009-07-31 21:48:56 +00:00
Mike Stump 67829f6493 And now we can generate a simple vtable. Still a work in progress...
llvm-svn: 77737
2009-07-31 21:43:43 +00:00
Anders Carlsson d65ab045e8 Move code from EmitUnion directly into the function that handles cast-to-union.
llvm-svn: 77735
2009-07-31 21:38:39 +00:00
Anders Carlsson 0d5f37b81a Use the struct builder for unions.
llvm-svn: 77732
2009-07-31 21:34:04 +00:00
Mike Stump dd93a19ac6 Fixup spacing and 80-col violations.
llvm-svn: 77731
2009-07-31 21:31:32 +00:00
Owen Anderson 0b75f23b94 Update for LLVM API change.
llvm-svn: 77722
2009-07-31 20:28:54 +00:00