]>
granicus.if.org Git - clang/log
Daniel Dunbar [Sat, 1 Aug 2009 10:18:01 +0000 (10:18 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77784
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 1 Aug 2009 09:41:09 +0000 (09:41 +0000)]
lit: Two more sh lex/parse bugs (but its so simple!)
- Empty arguments weren't handled correctly.
- Escapes outside quoted strings weren't handled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77783
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 1 Aug 2009 06:17:29 +0000 (06:17 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77782
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 1 Aug 2009 06:07:15 +0000 (06:07 +0000)]
Ok, ok, I give in. Fix tests for unused result warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77780
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 1 Aug 2009 05:59:39 +0000 (05:59 +0000)]
Temporarily disable out-of-bounds checking. The current checking logic will not work quite right with the changes I'm about to commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77779
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 1 Aug 2009 05:57:38 +0000 (05:57 +0000)]
Use %S, not `pwd`, and enable a line that *does* work.
- Doug, please check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77778
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 1 Aug 2009 05:52:04 +0000 (05:52 +0000)]
lit: Fix two sh lexing bugs.
- '\\\\' inside a "..." string becomes '\\'.
- The '<' token wasn't being recognized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77777
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 1 Aug 2009 04:51:30 +0000 (04:51 +0000)]
'unset' isn't needed in these tests anymore, we always run with a controlled
environment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77776
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 1 Aug 2009 04:11:36 +0000 (04:11 +0000)]
lit: Fix a name lookup problem, which only occurred on a race condition. This is
why dynamic binding sucks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77773
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 1 Aug 2009 04:06:02 +0000 (04:06 +0000)]
lit: Pull a few more variables into the TestingConfig object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77772
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 1 Aug 2009 03:35:40 +0000 (03:35 +0000)]
lit: Don't use threads when only running one test, or with -j 1.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77766
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 1 Aug 2009 03:22:27 +0000 (03:22 +0000)]
MultiTestRunner: Add 'sh' parsing to ShUtil.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77765
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 1 Aug 2009 01:39:59 +0000 (01:39 +0000)]
More warnings for unused expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77763
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 31 Jul 2009 23:15:31 +0000 (23:15 +0000)]
Add beginnigs of rtti generation, wire up more of -fno-exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77751
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 31 Jul 2009 21:48:56 +0000 (21:48 +0000)]
Remove the old struct builder code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77738
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 31 Jul 2009 21:43:43 +0000 (21:43 +0000)]
And now we can generate a simple vtable. Still a work in progress...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77737
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 31 Jul 2009 21:38:39 +0000 (21:38 +0000)]
Move code from EmitUnion directly into the function that handles cast-to-union.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77735
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 31 Jul 2009 21:34:04 +0000 (21:34 +0000)]
Use the struct builder for unions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77732
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 31 Jul 2009 21:31:32 +0000 (21:31 +0000)]
Fixup spacing and 80-col violations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77731
91177308 -0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 31 Jul 2009 20:28:54 +0000 (20:28 +0000)]
Update for LLVM API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77722
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 31 Jul 2009 19:02:11 +0000 (19:02 +0000)]
For a CXXOperatorCallExpr, fix the order that StmtLocResolver uses to check subexpressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77713
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 31 Jul 2009 18:36:42 +0000 (18:36 +0000)]
Make the recanonicalization-for-an-out-of-line-definition test case a bit trickier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77707
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 31 Jul 2009 18:34:30 +0000 (18:34 +0000)]
Allow one to update the type representation of the declaration specifiers. Will be used by an upcoming commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77703
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 31 Jul 2009 18:32:42 +0000 (18:32 +0000)]
Remove a redundant getCanonicalType call
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77702
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 31 Jul 2009 18:25:34 +0000 (18:25 +0000)]
Add code to setup the vtable pointer in the constructor. Work in progress.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77699
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 31 Jul 2009 18:24:12 +0000 (18:24 +0000)]
New test case for rev. 77694.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77698
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 31 Jul 2009 18:12:18 +0000 (18:12 +0000)]
MultiTestRunner: Fix invalid warning when pointing 'lit' directly at a test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77690
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 31 Jul 2009 17:46:44 +0000 (17:46 +0000)]
Fix spacing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77688
91177308 -0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 31 Jul 2009 17:39:36 +0000 (17:39 +0000)]
Update for LLVM API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77686
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 31 Jul 2009 16:50:39 +0000 (16:50 +0000)]
Fix 80-col violation
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77683
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 31 Jul 2009 16:07:31 +0000 (16:07 +0000)]
Make canonicalization of overloaded function declarations match the
Itanium C++ ABI's name mangling, since both are related to the notion
of "equivalent" function templates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77678
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 31 Jul 2009 15:46:56 +0000 (15:46 +0000)]
Canonicalize template template parameters. We can't test this yet, but
it's "obviously correct" :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77677
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 31 Jul 2009 15:45:02 +0000 (15:45 +0000)]
Canonicalize function parameters
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77676
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 31 Jul 2009 07:59:05 +0000 (07:59 +0000)]
MultiTestRunner: Add module for lexing 'sh' commands.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77668
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 31 Jul 2009 05:57:11 +0000 (05:57 +0000)]
Add missing test suffixes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77666
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 31 Jul 2009 05:54:17 +0000 (05:54 +0000)]
MultiTestRunner: Simplify, cleanup, and rename!
- MultiTestRunner will eventually be renamed to 'lit', for LLVM integrated
tester/testing. This has the pros of being pronouncable and short.
- "Project" level configuration lives in 'lit.cfg', which is also what lit uses
to find the root testing directory in some cases. This can be overridden for
use in project files which want to precisely specify where things are.
- TestRunner.py is not longer able to be invoked directly.
- Moved some code to Util.py.
- Introduced a configuration object.
- Cleaned up --help, removed a few not-very-useful options.
- Tried not to break anything that works. :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77665
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 31 Jul 2009 05:24:01 +0000 (05:24 +0000)]
Canonicalization and profiling for overloaded function declarations,
for those extra-esoteric cases. Not that any two given C++ compilers
agree on this test case, but this change gives us a strong definition
of equivalent types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77664
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 31 Jul 2009 03:54:25 +0000 (03:54 +0000)]
Canonicalize dependent extended vector types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77663
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ryan Flynn [Fri, 31 Jul 2009 02:52:19 +0000 (02:52 +0000)]
PR3679 - enable #pragma weak aliasing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77660
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 31 Jul 2009 02:45:11 +0000 (02:45 +0000)]
Rename Action::TagKind to Action::TagUseKind, which removes both a misnomer
and a name collision.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77658
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 31 Jul 2009 02:20:35 +0000 (02:20 +0000)]
sp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77656
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 31 Jul 2009 02:02:20 +0000 (02:02 +0000)]
Whitespace around else canonicalization and fix 80-col violations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77655
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 31 Jul 2009 01:43:05 +0000 (01:43 +0000)]
Make the check for the linkage of a template handle the case of nested
linkage specifications correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77653
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 31 Jul 2009 01:23:52 +0000 (01:23 +0000)]
Add CK_DerivedToBase and use it PerformObjectMemberConversion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77652
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Fri, 31 Jul 2009 01:10:29 +0000 (01:10 +0000)]
Fix build warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77651
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 31 Jul 2009 00:48:10 +0000 (00:48 +0000)]
Add a CastKind enum to CastExpr. Right now it's not used for much but it will be :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77650
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 31 Jul 2009 00:34:52 +0000 (00:34 +0000)]
Fix use-after-release bug introduced in r77585 where the PathDiagnosticClient
created by AnalysisConsumer would be released by an instance of AnalysisManager
and then reused by later instances of AnalysisManager. Ownership of the
PathDiagnosticClient now belongs (for now) in AnalysisConsumer.
We also need this layering (for now) because the HTMLDiagnostiClient requires
that the entire translation unit be processed before emitting diagnostics. This
is done in its destructor (which should also be fixed, but that is another
issue).
This fixes PR 4653.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77648
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 31 Jul 2009 00:23:35 +0000 (00:23 +0000)]
Build canonical types for dependently-sized array types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77647
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 30 Jul 2009 23:55:19 +0000 (23:55 +0000)]
Add scan-build option '-no-failure-reports' to supress the creation of a 'failures' subdirectory that includes crash reports, preprocessed files, etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77644
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 30 Jul 2009 23:36:40 +0000 (23:36 +0000)]
Canonicalization of dependent C++0x decltype types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77643
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 30 Jul 2009 23:22:00 +0000 (23:22 +0000)]
Synthesize the default constructor which has not
been declared as needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77641
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 30 Jul 2009 23:18:24 +0000 (23:18 +0000)]
Canonicalization for dependent typeof(expr) types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77639
91177308 -0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 30 Jul 2009 23:11:26 +0000 (23:11 +0000)]
Update for LLVM API changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77638
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 30 Jul 2009 22:39:03 +0000 (22:39 +0000)]
Diagnose unused expression results for all statements, just not compound statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77631
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 30 Jul 2009 22:37:41 +0000 (22:37 +0000)]
Add casts to avoid a bunch of unused expr warnings. (They aren't reported right now due to a bug that I intend to fix). Ted, please review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77630
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 30 Jul 2009 22:28:39 +0000 (22:28 +0000)]
Canonicalize else spacing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77629
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 30 Jul 2009 22:17:18 +0000 (22:17 +0000)]
Factor code out into a DiagnoseUnusedExprResult function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77628
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 30 Jul 2009 21:47:44 +0000 (21:47 +0000)]
Note some other limitations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77626
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 30 Jul 2009 18:01:44 +0000 (18:01 +0000)]
Update based upon comments. Explain why we have an assert.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77612
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 30 Jul 2009 17:53:53 +0000 (17:53 +0000)]
We'll also need a vtable pointer if we have virtual bases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77610
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 30 Jul 2009 17:50:56 +0000 (17:50 +0000)]
What luck! Clang obtains support for refering to members of the
current instantiation when that current instantiation is a class
template partial specialization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77609
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 30 Jul 2009 17:49:11 +0000 (17:49 +0000)]
Patch for future ir-gen for destructor calls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77608
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 30 Jul 2009 17:41:23 +0000 (17:41 +0000)]
Lexically order files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77607
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 30 Jul 2009 17:40:51 +0000 (17:40 +0000)]
Support out-of-line definitions of the members of class template
partial specializations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77606
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 30 Jul 2009 16:10:26 +0000 (16:10 +0000)]
Initialize an otherwise-wild pointer. Fixes a crashy analyzer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77599
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 30 Jul 2009 10:38:43 +0000 (10:38 +0000)]
fix cmake build
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77589
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 30 Jul 2009 09:14:54 +0000 (09:14 +0000)]
simple fixes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77587
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 30 Jul 2009 09:11:52 +0000 (09:11 +0000)]
Make AnalysisManager into its own source file and a pure data management class.
Move all components creation code into AnalysisConsumer::DigestAnalyzerOptions().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77585
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 30 Jul 2009 03:55:04 +0000 (03:55 +0000)]
Update CMakeLists.txt
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77577
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 30 Jul 2009 03:42:08 +0000 (03:42 +0000)]
Fix Selector <-> GlobalSelector conversion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77575
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ryan Flynn [Thu, 30 Jul 2009 03:15:39 +0000 (03:15 +0000)]
PR3679 - handle #pragma weak
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77573
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 30 Jul 2009 02:43:05 +0000 (02:43 +0000)]
Add -fblocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77571
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 30 Jul 2009 01:57:45 +0000 (01:57 +0000)]
MultiTestRunner: Stop printing XFAILs on every run, this doesn't really have any
value.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77566
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 30 Jul 2009 01:17:21 +0000 (01:17 +0000)]
This patch collects all analysis context data into a new class
AnalysisContext.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77563
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 30 Jul 2009 01:10:26 +0000 (01:10 +0000)]
Remove bogus "unsupported" case for vectors (which shouldn't
ever trigger). Add an "unsupported" case that triggers for C++ code.
It would be nice if someone would implement this properly... it
shouldn't be too hard, but I haven't looked closely at the relevant
code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77562
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 30 Jul 2009 01:02:10 +0000 (01:02 +0000)]
Fix type to be consistent with the rest of the code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77560
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Thu, 30 Jul 2009 00:22:38 +0000 (00:22 +0000)]
Add ability to layout the vtable pointer in trivial cases. I noticed
that we would silently do bad things with virtual bases in the layout
code, so, we just turn them off. When people do better things with
them, we can turn them back on.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77556
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 30 Jul 2009 00:11:31 +0000 (00:11 +0000)]
Fix gcc warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77555
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 30 Jul 2009 00:10:25 +0000 (00:10 +0000)]
ir-gen for nested non-virtual base member access
in current class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77554
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 30 Jul 2009 00:04:39 +0000 (00:04 +0000)]
Add support for -Wno-long-long.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77552
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 30 Jul 2009 00:03:55 +0000 (00:03 +0000)]
Add support for ObjC message expressions, in the Analyzer:
-Accept an ObjC method and find all message expressions that this method may respond to.
-Accept an ObjC message expression and find all methods that may respond to it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77551
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 30 Jul 2009 00:02:19 +0000 (00:02 +0000)]
Update CMake.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77548
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:41:46 +0000 (23:41 +0000)]
Support ObjC methods as Entities.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77547
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 29 Jul 2009 23:41:44 +0000 (23:41 +0000)]
There's no point in going through the getAs<TagType> stuff to find the definition of a tag, since tags rarely have more than one or two declarations
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77546
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:41:33 +0000 (23:41 +0000)]
Use a STL helper template 'pair_value_iterator', by both DeclReferenceMap and SelectorMap.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77545
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:41:26 +0000 (23:41 +0000)]
Add ObjCMethodDecl::isThisDeclarationADefinition().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77544
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:41:18 +0000 (23:41 +0000)]
Index the selectors and provide the translation units that contain them
through the IndexProvider.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77543
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:41:08 +0000 (23:41 +0000)]
Add TranslationUnit::getSelectorMap().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77542
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:40:58 +0000 (23:40 +0000)]
Introduce SelectorMap whose purpose is to map selectors to objc methods and message exprs,
inside a particular ASTContext.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77541
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:40:48 +0000 (23:40 +0000)]
Find references inside blocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77540
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:40:39 +0000 (23:40 +0000)]
Use helper class ASTVisitor to fully traverse an AST.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77539
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:40:32 +0000 (23:40 +0000)]
Introduce the GlobalSelector class in the Indexing library.
GlobalSelector is an ASTContext-independent way to refer to Objective C selectors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77538
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:40:21 +0000 (23:40 +0000)]
Use an IdentifierTable for names used for Entities.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77537
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:40:14 +0000 (23:40 +0000)]
-Introduce the idx::Analyzer class used for getting indexing information, like finding
references of a declaration across translation units.
-Modify the index-test tool to use it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77536
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:40:02 +0000 (23:40 +0000)]
Introduce TULocation and TULocationHandler classes.
TULocation is like ASTLocation but also contains the TranslationUnit* that
the ASTLocation originated from.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77535
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:39:52 +0000 (23:39 +0000)]
Modify the Indexer class so that it can return the TranslationUnit that internal
decls originated from.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77534
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:39:42 +0000 (23:39 +0000)]
Add Entity::getInternalDecl() to be used only on Entities that refer to internal
(in translation unit) declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77533
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:39:35 +0000 (23:39 +0000)]
Constify ASTLocation::print.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77532
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:39:25 +0000 (23:39 +0000)]
Fix some comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77531
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 29 Jul 2009 23:39:18 +0000 (23:39 +0000)]
Add getDeclReferenceMap() to the abstract interface of TranslationUnit class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77530
91177308 -0d34-0410-b5e6-
96231b3b80d8