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
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
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
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
Argyrios Kyrtzidis
260a4703a9
For a CXXOperatorCallExpr, fix the order that StmtLocResolver uses to check subexpressions.
...
llvm-svn: 77713
2009-07-31 19:02:11 +00:00
Douglas Gregor
b9a955dc1d
Remove a redundant getCanonicalType call
...
llvm-svn: 77702
2009-07-31 18:32:42 +00:00
Mike Stump
bc78a728ee
Add code to setup the vtable pointer in the constructor. Work in progress.
...
llvm-svn: 77699
2009-07-31 18:25:34 +00:00
Mike Stump
f332516136
Fix spacing.
...
llvm-svn: 77688
2009-07-31 17:46:44 +00:00
Owen Anderson
fe4e34707c
Update for LLVM API change.
...
llvm-svn: 77686
2009-07-31 17:39:36 +00:00
Douglas Gregor
1d1d16c43e
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.
llvm-svn: 77678
2009-07-31 16:07:31 +00:00
Douglas Gregor
c97f09f565
Canonicalize template template parameters. We can't test this yet, but
...
it's "obviously correct" :)
llvm-svn: 77677
2009-07-31 15:46:56 +00:00
Douglas Gregor
70317123c9
Canonicalize function parameters
...
llvm-svn: 77676
2009-07-31 15:45:02 +00:00
Douglas Gregor
802a030d6e
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.
llvm-svn: 77664
2009-07-31 05:24:01 +00:00
Douglas Gregor
352169aed4
Canonicalize dependent extended vector types.
...
llvm-svn: 77663
2009-07-31 03:54:25 +00:00
Ryan Flynn
d963a49756
PR3679 - enable #pragma weak aliasing.
...
llvm-svn: 77660
2009-07-31 02:52:19 +00:00
John McCall
9bb74a5ef5
Rename Action::TagKind to Action::TagUseKind, which removes both a misnomer
...
and a name collision.
llvm-svn: 77658
2009-07-31 02:45:11 +00:00
John McCall
ef50e99783
sp.
...
llvm-svn: 77656
2009-07-31 02:20:35 +00:00
Mike Stump
e9c6ffc7d1
Whitespace around else canonicalization and fix 80-col violations.
...
llvm-svn: 77655
2009-07-31 02:02:20 +00:00
Eli Friedman
dfbd0c4b0d
Make the check for the linkage of a template handle the case of nested
...
linkage specifications correctly.
llvm-svn: 77653
2009-07-31 01:43:05 +00:00
Anders Carlsson
a076d14514
Add CK_DerivedToBase and use it PerformObjectMemberConversion.
...
llvm-svn: 77652
2009-07-31 01:23:52 +00:00
Mike Stump
5b78af9ed7
Fix build warnings.
...
llvm-svn: 77651
2009-07-31 01:10:29 +00:00
Anders Carlsson
a26159261c
Add a CastKind enum to CastExpr. Right now it's not used for much but it will be :)
...
llvm-svn: 77650
2009-07-31 00:48:10 +00:00
Ted Kremenek
df4b3dc3a4
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.
llvm-svn: 77648
2009-07-31 00:34:52 +00:00
Douglas Gregor
f3f955279b
Build canonical types for dependently-sized array types.
...
llvm-svn: 77647
2009-07-31 00:23:35 +00:00
Douglas Gregor
a21f6c3c71
Canonicalization of dependent C++0x decltype types.
...
llvm-svn: 77643
2009-07-30 23:36:40 +00:00
Fariborz Jahanian
6f14c73087
Synthesize the default constructor which has not
...
been declared as needed.
llvm-svn: 77641
2009-07-30 23:22:00 +00:00
Douglas Gregor
a5dd9f858f
Canonicalization for dependent typeof(expr) types.
...
llvm-svn: 77639
2009-07-30 23:18:24 +00:00
Owen Anderson
7ec07a573c
Update for LLVM API changes.
...
llvm-svn: 77638
2009-07-30 23:11:26 +00:00
Anders Carlsson
5c5f160c7f
Diagnose unused expression results for all statements, just not compound statements.
...
llvm-svn: 77631
2009-07-30 22:39:03 +00:00
Mike Stump
658fe02d17
Canonicalize else spacing.
...
llvm-svn: 77629
2009-07-30 22:28:39 +00:00
Anders Carlsson
59a2ab9720
Factor code out into a DiagnoseUnusedExprResult function.
...
llvm-svn: 77628
2009-07-30 22:17:18 +00:00
Mike Stump
a523b2d7a0
Note some other limitations.
...
llvm-svn: 77626
2009-07-30 21:47:44 +00:00
Mike Stump
57724c2f7e
Update based upon comments. Explain why we have an assert.
...
llvm-svn: 77612
2009-07-30 18:01:44 +00:00
Mike Stump
44b8e90369
We'll also need a vtable pointer if we have virtual bases.
...
llvm-svn: 77610
2009-07-30 17:53:53 +00:00
Douglas Gregor
833834fcab
What luck! Clang obtains support for refering to members of the
...
current instantiation when that current instantiation is a class
template partial specialization.
llvm-svn: 77609
2009-07-30 17:50:56 +00:00
Fariborz Jahanian
aa01d2a532
Patch for future ir-gen for destructor calls.
...
llvm-svn: 77608
2009-07-30 17:49:11 +00:00
Ted Kremenek
118cef36b8
Lexically order files.
...
llvm-svn: 77607
2009-07-30 17:41:23 +00:00
Douglas Gregor
1530138fd0
Support out-of-line definitions of the members of class template
...
partial specializations.
llvm-svn: 77606
2009-07-30 17:40:51 +00:00
Douglas Gregor
4e5a974c00
Initialize an otherwise-wild pointer. Fixes a crashy analyzer
...
llvm-svn: 77599
2009-07-30 16:10:26 +00:00
Benjamin Kramer
2a94b3dcdb
fix cmake build
...
llvm-svn: 77589
2009-07-30 10:38:43 +00:00
Zhongxing Xu
4b5d6bc33a
simple fixes.
...
llvm-svn: 77587
2009-07-30 09:14:54 +00:00
Zhongxing Xu
4b03d4913a
Make AnalysisManager into its own source file and a pure data management class.
...
Move all components creation code into AnalysisConsumer::DigestAnalyzerOptions().
llvm-svn: 77585
2009-07-30 09:11:52 +00:00
Daniel Dunbar
7be573f05a
Update CMakeLists.txt
...
llvm-svn: 77577
2009-07-30 03:55:04 +00:00
Argyrios Kyrtzidis
fc2ed30ab8
Fix Selector <-> GlobalSelector conversion.
...
llvm-svn: 77575
2009-07-30 03:42:08 +00:00
Ryan Flynn
7d470f3466
PR3679 - handle #pragma weak
...
llvm-svn: 77573
2009-07-30 03:15:39 +00:00
Zhongxing Xu
14407bf25a
This patch collects all analysis context data into a new class
...
AnalysisContext.
llvm-svn: 77563
2009-07-30 01:17:21 +00:00
Eli Friedman
e8caa2a72f
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.
llvm-svn: 77562
2009-07-30 01:10:26 +00:00
Mike Stump
776d3401d2
Fix type to be consistent with the rest of the code.
...
llvm-svn: 77560
2009-07-30 01:02:10 +00:00
Mike Stump
3dc7eb9440
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.
llvm-svn: 77556
2009-07-30 00:22:38 +00:00
Eli Friedman
13ddd8514f
Fix gcc warning.
...
llvm-svn: 77555
2009-07-30 00:11:31 +00:00
Fariborz Jahanian
d375454dcf
ir-gen for nested non-virtual base member access
...
in current class.
llvm-svn: 77554
2009-07-30 00:10:25 +00:00
Argyrios Kyrtzidis
bd92767014
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.
llvm-svn: 77551
2009-07-30 00:03:55 +00:00
Argyrios Kyrtzidis
ce60c5ea60
Update CMake.
...
llvm-svn: 77548
2009-07-30 00:02:19 +00:00
Argyrios Kyrtzidis
2eff90515f
Support ObjC methods as Entities.
...
llvm-svn: 77547
2009-07-29 23:41:46 +00:00
Douglas Gregor
82c80a59ee
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
...
llvm-svn: 77546
2009-07-29 23:41:44 +00:00
Argyrios Kyrtzidis
d70a92139f
Index the selectors and provide the translation units that contain them
...
through the IndexProvider.
llvm-svn: 77543
2009-07-29 23:41:18 +00:00
Argyrios Kyrtzidis
b8470e4f75
Introduce SelectorMap whose purpose is to map selectors to objc methods and message exprs,
...
inside a particular ASTContext.
llvm-svn: 77541
2009-07-29 23:40:58 +00:00
Argyrios Kyrtzidis
34be01b9f4
Find references inside blocks.
...
llvm-svn: 77540
2009-07-29 23:40:48 +00:00
Argyrios Kyrtzidis
c3deb79049
Use helper class ASTVisitor to fully traverse an AST.
...
llvm-svn: 77539
2009-07-29 23:40:39 +00:00
Argyrios Kyrtzidis
d219a9a763
Introduce the GlobalSelector class in the Indexing library.
...
GlobalSelector is an ASTContext-independent way to refer to Objective C selectors.
llvm-svn: 77538
2009-07-29 23:40:32 +00:00
Argyrios Kyrtzidis
ca8a0e24cb
Use an IdentifierTable for names used for Entities.
...
llvm-svn: 77537
2009-07-29 23:40:21 +00:00
Argyrios Kyrtzidis
91d3df0b53
-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.
llvm-svn: 77536
2009-07-29 23:40:14 +00:00
Argyrios Kyrtzidis
a82e8848ee
Introduce TULocation and TULocationHandler classes.
...
TULocation is like ASTLocation but also contains the TranslationUnit* that
the ASTLocation originated from.
llvm-svn: 77535
2009-07-29 23:40:02 +00:00
Argyrios Kyrtzidis
af79296645
Modify the Indexer class so that it can return the TranslationUnit that internal
...
decls originated from.
llvm-svn: 77534
2009-07-29 23:39:52 +00:00
Argyrios Kyrtzidis
bc6c64de44
Constify ASTLocation::print.
...
llvm-svn: 77532
2009-07-29 23:39:35 +00:00
Argyrios Kyrtzidis
f1a0fd852f
Introduce a helper template for the Handler classes and use it instead
...
of the iterator of the Indexer class.
llvm-svn: 77528
2009-07-29 23:39:03 +00:00
Argyrios Kyrtzidis
d3e037ff89
Add an assert.
...
llvm-svn: 77527
2009-07-29 23:38:51 +00:00
Argyrios Kyrtzidis
14df96c730
Accept Handler objects in parameters as references.
...
Reinforces that they shouldn't be null and it's a bit more natural when
they are passed as stack objects.
llvm-svn: 77526
2009-07-29 23:38:45 +00:00
Argyrios Kyrtzidis
9ddd99ade7
Rename EntityHandler::HandleEntity to Handle.
...
llvm-svn: 77525
2009-07-29 23:38:35 +00:00
Argyrios Kyrtzidis
dd9ee4aa04
-Make IndexProvider an abstract interface for getting indexing information.
...
-Introduce Indexer as an IndexProvider implementation.
llvm-svn: 77524
2009-07-29 23:38:21 +00:00
Douglas Gregor
b6b8f9e291
Make tag declarations redeclarable. This change has three purposes:
...
1) Allow the Index library (and any other interested client) to walk
the set of declarations for a given tag (enum, union, class,
whatever). At the moment, this information is not readily available.
2) Reduce our dependence on TagDecl::TypeForDecl being mapped down
to a TagType (for which getDecl() will return the tag definition, if
one exists). This property won't exist for class template partial
specializations.
3) Make the canonical declaration of a TagDecl actually canonical,
e.g., so that it does not change when the tag is defined.
llvm-svn: 77523
2009-07-29 23:36:44 +00:00
Douglas Gregor
716dabbb1b
Eliminate an unused-variable warning
...
llvm-svn: 77518
2009-07-29 22:40:58 +00:00
Owen Anderson
9793f0e4d7
Update for LLVM API change.
...
llvm-svn: 77514
2009-07-29 22:16:19 +00:00
Ted Kremenek
c23c7e6a51
Change uses of:
...
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsRecordType() -> Type::getAs<RecordType>()
Type::getAsPointerType() -> Type::getAs<PointerType>()
Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>()
Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>()
Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>()
Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>()
Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
Type::getAsTagType() -> Type::getAs<TagType>()
And remove Type::getAsReferenceType(), etc.
This change is similar to one I made a couple weeks ago, but that was partly
reverted pending some additional design discussion. With Doug's pending smart
pointer changes for Types, it seemed natural to take this approach.
llvm-svn: 77510
2009-07-29 21:53:49 +00:00
Ted Kremenek
4301526e8d
Remove 'StoreManager::OldCastRegion()', TypedViewRegion (which only
...
OldCastRegion used), and the associated command line option
'-analyzer-store=old-basic-cast'.
llvm-svn: 77509
2009-07-29 21:43:22 +00:00
Fariborz Jahanian
4b12ed115a
Some refactoring of member access for
...
performace sake. Also added a test case.
llvm-svn: 77502
2009-07-29 20:41:46 +00:00
Eli Friedman
8e1433b370
Refactor base/member initializers, and construct them correctly in cases
...
with dependent types. Fixes PR4621 and PR4627.
llvm-svn: 77498
2009-07-29 19:44:27 +00:00
Fariborz Jahanian
3f15083f73
Check accessibility when converting object to the base
...
class.
llvm-svn: 77497
2009-07-29 19:40:11 +00:00
Owen Anderson
ade90fd1ba
Update for LLVM API change.
...
llvm-svn: 77492
2009-07-29 18:54:39 +00:00
Fariborz Jahanian
7be1ad814b
No longer need to keep base class offsets in the offset
...
table as it has its own place now.
llvm-svn: 77491
2009-07-29 18:50:06 +00:00
Fariborz Jahanian
bb67b827d9
Patch to provide cast of objects in member access
...
excpression, if needed, and remove some ir-gen code
now unnencessary.
llvm-svn: 77490
2009-07-29 18:40:24 +00:00
Douglas Gregor
aa87ebc0c1
[llvm up]
...
A template name can refer to a set of overloaded function
templates. Model this in TemplateName, which can now refer to an
OverloadedFunctionDecl that contains function templates. This removes
an unspeakable hack in Sema::isTemplateName.
llvm-svn: 77488
2009-07-29 18:26:50 +00:00
Ted Kremenek
87a7a451ad
Remove some uses of TypedViewRegion, and use getBaseRegion() in a context where
...
we don't care about ElementRegions layered on top of a base region.
llvm-svn: 77484
2009-07-29 18:17:40 +00:00
Ted Kremenek
bca70671e7
Make StoreManager::InvalidateRegion() virtual, move the current implementation
...
in StoreManager to RegionStoreManager, and create a special, highly reduced
version in BasicStoreManager.
These changes are in preparation for future RegionStore-specific changes to
InvalidateRegion.
llvm-svn: 77483
2009-07-29 18:16:25 +00:00
Ted Kremenek
ccf3335939
Add 'MemRegion::getBaseRegion()', a utility method to strip ElementRegions with
...
index 0. This will be used for refinements to InvalidateRegion and CastRegion.
llvm-svn: 77481
2009-07-29 18:14:27 +00:00
Ted Kremenek
bb902265af
canSymbolicate() should only return true for integer types that are scalars.
...
llvm-svn: 77479
2009-07-29 18:12:48 +00:00
Sebastian Redl
63c4da01c8
Check for identical types in C++ catch expression. Patch by Erik Verbruggen.
...
llvm-svn: 77475
2009-07-29 17:15:45 +00:00
Daniel Dunbar
a5b3351809
Don't use a formatted ostream when writing .ll either.
...
llvm-svn: 77474
2009-07-29 17:12:55 +00:00
Daniel Dunbar
d8c3178cee
Don't use a formatted ostream when writing .bc files. I don't really understand
...
this interface design, Chris please check.
llvm-svn: 77473
2009-07-29 17:10:26 +00:00
Douglas Gregor
b142c2d0a8
When lookup of an identifier preceding a '<' finds a set of overloaded
...
functions, only return those overloaded functions that are actually
function templates. Note that there is still a glaring problem with
treating an OverloadedFunctionDecl as a TemplateName.
llvm-svn: 77472
2009-07-29 16:56:42 +00:00
Douglas Gregor
ab60c7f60b
Remove an obsolete kludge based on the previous, completely broken handling of function templates
...
llvm-svn: 77464
2009-07-29 16:15:53 +00:00
Douglas Gregor
0004417e81
Use the new statement/expression profiling code to unique dependent
...
template arguments, as in template specialization types. This permits
matching out-of-line definitions of members for class templates that
involve non-type template parameters.
llvm-svn: 77462
2009-07-29 16:09:57 +00:00
Fariborz Jahanian
72b1f24bd2
Use the existing API for base offset. Use suitable llvm type
...
for offset ir-gen.
llvm-svn: 77458
2009-07-29 15:54:56 +00:00
Steve Naroff
85d9715c24
Fix <rdar://problem/7100524> regression: "error: incompatible operand types ('void *' and 'NSString *')".
...
Remove XFAIL from 'conditional-expr-4.m' test case (which would have caught this).
Also tweaked several aspects of the test to jive with the current type checking.
llvm-svn: 77453
2009-07-29 15:09:39 +00:00
Steve Naroff
d390fd99d9
Incorporate feedback from Chris (on r76979).
...
llvm-svn: 77452
2009-07-29 14:06:03 +00:00
Sebastian Redl
955a067bdd
Make functional-style casts emit correct messages, and fix a crash-on-invalid.
...
llvm-svn: 77451
2009-07-29 13:50:23 +00:00
Zhongxing Xu
c2394f0ad9
add a fixme
...
llvm-svn: 77447
2009-07-29 08:13:37 +00:00
Daniel Dunbar
b9a68612e2
BlockScopeInfo::hasPrototype was uninitialized.
...
llvm-svn: 77421
2009-07-29 01:59:17 +00:00
Daniel Dunbar
a444cc2fa8
CharLiteralParser::IsMultiChar was sometimes uninitialized.
...
llvm-svn: 77420
2009-07-29 01:46:05 +00:00
Daniel Dunbar
841f14b609
Add missing '"'
...
llvm-svn: 77416
2009-07-29 01:10:25 +00:00
Fariborz Jahanian
82e2874270
Code refactoring to define getCXXRecordDeclForPointerType
...
and use it in several places.
llvm-svn: 77411
2009-07-29 00:44:13 +00:00
Mike Stump
93246cc475
Some minor cleanups, thanks Chris.
...
llvm-svn: 77402
2009-07-28 23:57:15 +00:00
Mike Stump
2adb4dab54
Some style fixes, thanks Chris.
...
llvm-svn: 77400
2009-07-28 23:47:15 +00:00
Mike Stump
bce7a27d22
Add support for -Wmissing-noreturn.
...
llvm-svn: 77391
2009-07-28 23:11:12 +00:00
Douglas Gregor
a8e02e7863
Refactor the code that produces a TemplateSpecializationType, so that
...
canonicalization for dependent TemplateSpecializationTypes occurs
within ASTContext::getTemplateSpecializationType. Also, move template
argument canonicalization into ASTContext::getCanonicalTemplateArgument.
llvm-svn: 77388
2009-07-28 23:00:59 +00:00
Chris Lattner
a58b3af802
remove extraneous braces
...
llvm-svn: 77386
2009-07-28 22:49:34 +00:00
Mike Stump
3bf1ab48d3
Add noreturn support for blocks.
...
llvm-svn: 77377
2009-07-28 22:04:01 +00:00
Fariborz Jahanian
f17071580f
ir-gen derived-to-base conversion in implicit casts.
...
llvm-svn: 77374
2009-07-28 22:00:58 +00:00
Owen Anderson
3cc120a51e
Update for LLVM API change.
...
llvm-svn: 77368
2009-07-28 21:22:35 +00:00
Anders Carlsson
019f414261
Remove the old RecordOrganizer.
...
llvm-svn: 77365
2009-07-28 21:03:34 +00:00
Ted Kremenek
a41d9dd1f1
Fix PR 4631. The compound initializers of unions were not being evaluated, which
...
could cause false positives if any the subexpressions had side-effects. These
initializers weren't evaluated because the StoreManager would need to handle
them, but that's an orthogonal problem of whether or not the StoreManager can
handle the binding.
llvm-svn: 77361
2009-07-28 20:46:55 +00:00
Ted Kremenek
faf0c64d9d
Fix regression in attribute 'nonnull' checking when a transition node
...
was created but not added to the destination NodeSet. This fixes PR 4630.
llvm-svn: 77353
2009-07-28 19:24:31 +00:00
Anders Carlsson
fc8cfa8b9f
Add a field for C++ specific data to ASTRecordLayout. Use it to store the non-virtual size and alignment + base offsets.
...
llvm-svn: 77352
2009-07-28 19:24:15 +00:00
Fariborz Jahanian
a399dfae19
More cleanup of data member access and then some.
...
llvm-svn: 77351
2009-07-28 18:54:57 +00:00
Owen Anderson
47034e1733
Update for LLVM API change.
...
llvm-svn: 77349
2009-07-28 18:33:04 +00:00
Chris Lattner
2706a55071
fix PR4633: cast to void should silence the 'unused expression' warning.
...
llvm-svn: 77344
2009-07-28 18:25:28 +00:00
Chris Lattner
1d0f16f22a
add some fixme's
...
llvm-svn: 77343
2009-07-28 18:25:06 +00:00
Fariborz Jahanian
b77659f4ae
Some code cleanup.
...
llvm-svn: 77339
2009-07-28 18:09:28 +00:00
Anders Carlsson
d5d6413aa5
More CGRecordLayoutBuilder cleanup.
...
llvm-svn: 77335
2009-07-28 17:56:36 +00:00
Fariborz Jahanian
5142fbd02e
More work toward data member access ir-gen.
...
llvm-svn: 77332
2009-07-28 17:38:28 +00:00
Douglas Gregor
32615a13f4
Fix a typo in a comment
...
llvm-svn: 77324
2009-07-28 16:39:25 +00:00
Douglas Gregor
d9aedfaa5a
Profiling the pointer of a canonical type is sufficient to uniquely identify the type
...
llvm-svn: 77321
2009-07-28 15:32:17 +00:00
Douglas Gregor
4488259d40
Finish profile support for statements.
...
llvm-svn: 77320
2009-07-28 15:27:13 +00:00
Douglas Gregor
a709509f96
Complete profile support for C++ and Objective-C expressions
...
llvm-svn: 77318
2009-07-28 14:44:31 +00:00
John McCall
8945266f3d
Bounds checking for address spaces.
...
llvm-svn: 77303
2009-07-28 06:52:18 +00:00
Daniel Dunbar
ec5ae3d75a
CallExpr's SubExprs sometimes were allocated in the wrong place.
...
llvm-svn: 77302
2009-07-28 06:29:46 +00:00
John McCall
7be52a8179
Reimplement QualifierSet using a single word, as requested by dgregor.
...
llvm-svn: 77299
2009-07-28 05:41:20 +00:00
Argyrios Kyrtzidis
f390c43c3c
Implement ObjCMethodDecl::getCanonicalDecl().
...
llvm-svn: 77298
2009-07-28 05:11:17 +00:00
Argyrios Kyrtzidis
a56fa19ac6
-Add ObjCCategoryImplDecl::getCategoryClass() which returns the category interface decl.
...
-Correct ObjCMethodDecl::getNextRedeclaration(); A method in a ObjCCategoryImplDecl should point to
a method in the associated ObjCCategoryDecl, not the ObjCInterfaceDecl.
llvm-svn: 77297
2009-07-28 05:11:05 +00:00
Argyrios Kyrtzidis
2cee40daa7
Use ObjCImplDecl in place of ObjCCategoryImplDecl/ObjCImplementationDecl.
...
llvm-svn: 77296
2009-07-28 05:10:52 +00:00
Mike Stump
a4de80b8b1
Make longjmp a real builtin.
...
llvm-svn: 77291
2009-07-28 02:25:19 +00:00
John McCall
caa1945306
Allow functions to be marked "implicit return zero" and so mark main().
...
Codegen by initializing the return value with its LLVM type's null value.
llvm-svn: 77288
2009-07-28 01:00:58 +00:00
Douglas Gregor
5c193b9e18
Add a Profile function for statements so that we can (eventually) determine
...
when statements and expressions are equivalent.
llvm-svn: 77284
2009-07-28 00:33:38 +00:00
Ted Kremenek
4c9f161fd5
Fix helper function GetNextStmt() to look for the first statement that has a
...
valid SourceLocation.
llvm-svn: 77280
2009-07-28 00:07:15 +00:00
Mike Stump
82a9e445b7
Make sure to move the comment with the code.
...
llvm-svn: 77279
2009-07-28 00:07:08 +00:00
Fariborz Jahanian
e309b48a22
Patch for objc's zero-const exception to not assume
...
that @catch(...) cathces all exceptions (c++ objects
are not cought by that).
llvm-svn: 77270
2009-07-27 23:12:41 +00:00
Owen Anderson
0e0189d64d
Update for LLVM API change.
...
llvm-svn: 77267
2009-07-27 22:29:56 +00:00
Mike Stump
31d9254f7a
Ensure we can work through typedefs.
...
llvm-svn: 77265
2009-07-27 22:25:19 +00:00
Ted Kremenek
04ade6f1cb
(1) Enable PlistDiagnostics to take an option "PathDiagnosticClientFactory"
...
object that it can use to forward PathDiagnostics for further processing. Along
with this feature, the PlistDiagnostics object logs which files are created by
the forwarding of the PathDiagnostics.
(2) Create a new PathDiagnosticClientFactory object for HTMLDiagnostics,
allowing other PathDiagnosticClients to forward PathDiagnostics through an
opaque interface.
(3) Create a "plist-html" diagnostics option in AnalysisConsumer to allow the
logging of HTML files created in a hybrid Plist+HTML diagnostic client.
llvm-svn: 77264
2009-07-27 22:13:39 +00:00
Mike Stump
9e3b01f697
Add knowledge about _longjmp being noreturn.
...
llvm-svn: 77254
2009-07-27 21:45:16 +00:00
Mike Stump
9a9e0c2b17
Add builtin knowledge about longjmp being noreturn. Add printing for
...
the noreturn attribute.
llvm-svn: 77253
2009-07-27 21:33:40 +00:00
Owen Anderson
e05f2ed478
Update for LLVM API change.
...
llvm-svn: 77249
2009-07-27 21:00:51 +00:00
Fariborz Jahanian
7b2b1ec6b1
Some minor changes toward support of data
...
member access in the presense of non-virtual bases.
llvm-svn: 77246
2009-07-27 20:57:45 +00:00
Mike Stump
ca6c875e47
Add noreturn for exit.
...
llvm-svn: 77237
2009-07-27 19:14:18 +00:00
Argyrios Kyrtzidis
067c407c48
Make ObjCImplDecl inherit from ObjCContainerDecl.
...
ObjCContainerDecl now is the root class for objc decls that contain methods.
llvm-svn: 77235
2009-07-27 19:04:32 +00:00
Devang Patel
6a3b3fe98a
Use DICompositeType->replaceAllUsesWith()
...
llvm-svn: 77228
2009-07-27 18:42:03 +00:00
Douglas Gregor
d612997e73
When instantiating a variable without an initializer, call
...
ActOnUninitializedDecl.
llvm-svn: 77211
2009-07-27 17:43:39 +00:00
Anders Carlsson
cabdeb4932
Use the CGRecordLayoutBuilder even if there are no fields, because in C++ an empty class will have a padding byte.
...
llvm-svn: 77205
2009-07-27 17:10:54 +00:00
Anders Carlsson
72fb384a65
Enable the new struct type builder now that the constant struct builder works. (The old code will still be there until we know that everything works well.
...
llvm-svn: 77190
2009-07-27 15:31:55 +00:00
Anders Carlsson
b97a3ec4e7
Fix a tail padding bug in the record layout builder code. The bug was found by an existing test.
...
llvm-svn: 77189
2009-07-27 14:55:54 +00:00
Anders Carlsson
b7130ed888
Enable the new constant struct builder by default. The old code is still in place but will be removed shortly. The new struct builder works on big endian systems.
...
llvm-svn: 77185
2009-07-27 05:54:15 +00:00
Anders Carlsson
bff6b49cd0
More work on the constant struct builder, fix a couple of thinkos and add support for inserting part of a bitfield in the previous byte.
...
llvm-svn: 77180
2009-07-27 02:56:37 +00:00
Anders Carlsson
ba4c6d1c91
More work on bitfield support in the new constant struct builder.
...
llvm-svn: 77177
2009-07-27 01:23:51 +00:00
Mike Stump
21e0f895a1
Fix PR4624.
...
llvm-svn: 77176
2009-07-27 00:44:23 +00:00
Nuno Lopes
bd2cd92907
fix segfault (because of erasing after the vector boundaries) when the cached token position is at the end
...
llvm-svn: 77159
2009-07-26 16:36:45 +00:00
Nuno Lopes
0b797b1c9d
add gentoo 2009.0 g++ header locations
...
llvm-svn: 77158
2009-07-26 16:14:05 +00:00
Daniel Dunbar
e59313a298
Switch to getName()
...
llvm-svn: 77151
2009-07-26 09:28:40 +00:00
Daniel Dunbar
600dfac30a
Switch to using llvm::Value::getName()
...
llvm-svn: 77147
2009-07-26 08:32:30 +00:00
Daniel Dunbar
4f7dfaf650
Update for API change.
...
llvm-svn: 77112
2009-07-26 02:21:04 +00:00
Daniel Dunbar
6a82e424d0
Lookup targets by Triple instead of Module.
...
llvm-svn: 77108
2009-07-26 01:27:26 +00:00
Mike Stump
ea086c7263
Preserve qualifiers.
...
llvm-svn: 77097
2009-07-25 23:24:03 +00:00
Ryan Flynn
e5dc8594ea
PR3575 - warn on declared variable or function attributes after a definition, which are currently ignored.
...
llvm-svn: 77095
2009-07-25 22:29:44 +00:00
Argyrios Kyrtzidis
39c348d915
Refactor ObjCImplDecl::getInstanceMethod/getClassMethod into one
...
ObjCImplDecl::getMethod.
llvm-svn: 77094
2009-07-25 22:16:03 +00:00
Argyrios Kyrtzidis
553376be19
Refactor ObjCInterfaceDecl::lookupInstanceMethod/lookupClassMethod into one
...
ObjCInterfaceDecl::lookupMethod.
llvm-svn: 77093
2009-07-25 22:15:51 +00:00
Argyrios Kyrtzidis
e6ed65bee0
Refactor ObjCProtocolDecl::lookupInstanceMethod/lookupClassMethod into one
...
ObjCProtocolDecl::lookupMethod.
llvm-svn: 77092
2009-07-25 22:15:38 +00:00
Argyrios Kyrtzidis
6de0560b97
Refactor ObjCContainerDecl::getInstanceMethod/getClassMethod into one
...
ObjCContainerDecl::getMethod.
Avoids code duplication.
llvm-svn: 77091
2009-07-25 22:15:22 +00:00
Mike Stump
8c5d7996e8
Add noreturn as a type attribute, handle printing for them and handle
...
calls to noreturn function pointers when CFG building.
llvm-svn: 77089
2009-07-25 21:26:53 +00:00
Fariborz Jahanian
dedf1e4b1a
ir-gen for non-virtual base class initialization
...
in constructors.
llvm-svn: 77087
2009-07-25 21:12:28 +00:00
Sebastian Redl
9f831dbbcd
Implement C++ semantics for C-style and functional-style casts. This regresses Clang extension conversions, like vectors, but allows conversions via constructors and conversion operators.
...
Add custom conversions to static_cast.
llvm-svn: 77076
2009-07-25 15:41:38 +00:00
John McCall
02dee0a46a
Semantic checking for main().
...
Fix some invalid main() methods in the test suite that were nicely
exposed by the new checks.
llvm-svn: 77047
2009-07-25 04:36:53 +00:00
Anders Carlsson
3b484b928d
More work on the constant struct builder. We can now convert the struct to a packed struct when necessary.
...
llvm-svn: 77038
2009-07-25 01:40:29 +00:00
Fariborz Jahanian
f464edf81f
Some code refactoring per Daniel's feedback.
...
llvm-svn: 77030
2009-07-25 01:08:28 +00:00
Anders Carlsson
87a9a34e5b
More work on the constant struct builder. We now try to layout all constant structs but throw away the result.
...
llvm-svn: 77021
2009-07-25 00:24:56 +00:00
Owen Anderson
b7a2fe6f81
Update for LLVM API change.
...
llvm-svn: 77012
2009-07-24 23:12:58 +00:00
Douglas Gregor
a6ef8f0813
Template instantiation for static data members that are defined out-of-line.
...
Note that this also fixes a bug that affects non-template code, where we
were not treating out-of-line static data members are "file-scope" variables,
and therefore not checking their initializers.
llvm-svn: 77002
2009-07-24 20:34:43 +00:00
Fariborz Jahanian
a5c335527d
More Sema check for constructor's member initializer along
...
with type conversion to fix ir-gen crash.
llvm-svn: 77000
2009-07-24 20:28:49 +00:00
Ted Kremenek
b9cb11391d
In the "use of floating point variable as loop counter" check, check
...
if the DeclRefExpr is a float, not just either argument.
llvm-svn: 76998
2009-07-24 20:26:31 +00:00
Ted Kremenek
9c3952c03e
Have 'clang --analyze' run syntactic static analysis security checks.
...
llvm-svn: 76996
2009-07-24 20:03:11 +00:00
Mike Stump
d3bb557559
Fix 80-col violations, reflow a few comments and zap some extra
...
whitespace at ends of lines.
llvm-svn: 76992
2009-07-24 19:02:52 +00:00
Anders Carlsson
5e66fb5d16
Fix a release build warning.
...
llvm-svn: 76985
2009-07-24 18:20:38 +00:00
Fariborz Jahanian
2a1b5af130
More work toward initialization of objects
...
in constructors.
llvm-svn: 76980
2009-07-24 17:57:02 +00:00
Steve Naroff
e87026a08f
Allow front-end 'isa' access on object's of type 'id'.
...
Enhance test case to cover 'isa' access on interface types (clang produces an error, GCC produces a warning).
Still need back-end CodeGen for ObjCIsaExpr.
llvm-svn: 76979
2009-07-24 17:54:45 +00:00
Anders Carlsson
e2c6baf629
Don't use getLLVMFieldNo for bitfields when constructing the ivar layout maps for GC.
...
llvm-svn: 76978
2009-07-24 17:23:54 +00:00
Anders Carlsson
e1d5ca583f
Check in a half finished new constant struct builder (Obviously not used yet).
...
llvm-svn: 76969
2009-07-24 15:20:52 +00:00
Daniel Dunbar
c46a079957
Fix declaration of obc_enumerationMutation function, for GNU runtime.
...
llvm-svn: 76959
2009-07-24 07:40:24 +00:00
Ted Kremenek
963cc31583
Add doxygen comments and simplify expression.
...
llvm-svn: 76955
2009-07-24 06:55:42 +00:00
Ted Kremenek
3075428d16
Introduce a new variant type 'TryResult' to represent the result of
...
TryEvaluateBool instead of using a raw 'int'. This avoids any
confusion of how 'int' converts to bool, and makes the resultant code
easier to read.
Condense a bunch of 'addSuccessor()' calls in 'if ... else' to use the
ternary operator instead.
llvm-svn: 76947
2009-07-24 04:47:11 +00:00
Zhongxing Xu
30ac7607be
Add getDecl() to CallGraph and CallGraphNode.
...
llvm-svn: 76940
2009-07-24 03:41:11 +00:00
Zhongxing Xu
6c82313375
Constify methods.
...
llvm-svn: 76939
2009-07-24 03:38:27 +00:00
John McCall
d9baf6aed8
Test commit: make a little stub routine for semantic checking of main().
...
llvm-svn: 76934
2009-07-24 03:03:21 +00:00
Mike Stump
8e79f99b16
Implement new warning for functions declared 'noreturn' when they fall off the end.
...
llvm-svn: 76932
2009-07-24 02:49:01 +00:00
Anders Carlsson
6e853bf2b7
Get rid of the size parameter to AppendField. No functionality change.
...
llvm-svn: 76931
2009-07-24 02:45:50 +00:00
Ted Kremenek
745088c49e
Mark destructor of Checker virtual.
...
llvm-svn: 76924
2009-07-24 00:40:31 +00:00
Douglas Gregor
79f83eda84
This patch fixes the implementations of the __has_trivial_destructor
...
and __has_trivial_constructor builtin pseudo-functions and
additionally implements __has_trivial_copy and __has_trivial_assign,
from John McCall!
llvm-svn: 76916
2009-07-23 23:49:00 +00:00
Daniel Dunbar
91ade14197
Output UTF-16 string literals independent of host byte order.
...
- Steve, can you take a look at this? It seems like this code should live
elsewhere, and there is a FIXME about having Sema validates the UTF-8 to
UTF-16 conversion.
llvm-svn: 76915
2009-07-23 23:41:22 +00:00
Fariborz Jahanian
ca2f085a4e
Diagnose when base classes and members to be intialized
...
with constructors don't have a matching constructor.
llvm-svn: 76913
2009-07-23 23:32:59 +00:00
Mike Stump
773582dbb8
Refactor and push the evaluation as late as possible.
...
llvm-svn: 76911
2009-07-23 23:25:26 +00:00
Daniel Dunbar
64509b2765
Factor out map lookup for CFString constants.
...
llvm-svn: 76908
2009-07-23 22:52:48 +00:00
Anders Carlsson
085395426c
Don't just store the field/bit field info one field, do it for all fields in the union.
...
llvm-svn: 76907
2009-07-23 22:52:34 +00:00
Mike Stump
9620889f67
Some cleanups suggested by Daniel.
...
llvm-svn: 76906
2009-07-23 22:40:11 +00:00
Ted Kremenek
6610c0326b
Implement: <rdar://problem/6335715> rule request: gets() buffer overflow
...
llvm-svn: 76905
2009-07-23 22:29:41 +00:00
Anders Carlsson
e2accf4404
Fix another thinko.
...
llvm-svn: 76903
2009-07-23 21:52:03 +00:00
Ted Kremenek
70e5526a61
Add comments.
...
llvm-svn: 76901
2009-07-23 21:44:18 +00:00
Ted Kremenek
9c49762776
Refine checking and diagnostics for use of floating point variable as a counter.
...
This implements <rdar://problem/6336718> and checks for CERT secure coding
advisory FLP30-C.
llvm-svn: 76900
2009-07-23 21:34:35 +00:00
Anders Carlsson
516e5e7835
Correct a thinko in bitfield layout code. Fixes PR4611.
...
llvm-svn: 76898
2009-07-23 21:16:33 +00:00
Daniel Dunbar
2a5b83c7e6
Simplify, NFC.
...
llvm-svn: 76897
2009-07-23 20:38:28 +00:00
Daniel Dunbar
07b749230c
Switch the driver back to always using clang-cc by default (for C++, and
...
regardless of the architecture).
- This is a good default for development & testing; for example without this
any tests using 'clang' in the test suite will fail on PowerPC, since the
driver will avoid using clang.
- We don't want to actually ship something built this way, but that should be
handled via some sort of configuration file.
llvm-svn: 76886
2009-07-23 17:48:59 +00:00
Daniel Dunbar
635d481de0
Simplify.
...
llvm-svn: 76885
2009-07-23 17:33:49 +00:00
Anders Carlsson
d78fc89fcb
We don't need to keep track of the packed alignment, just whether the struct is packed or not. Fixes PR4610.
...
llvm-svn: 76884
2009-07-23 17:24:40 +00:00
Anders Carlsson
8af896c10a
Move the LLVM field number for bit fields into the BitFieldInfo structure, since it's meaning is completely different than for non-bit fields.
...
llvm-svn: 76882
2009-07-23 17:01:21 +00:00
Douglas Gregor
27bdf00fd7
Clean up the ActOnTag action, so that there is only a single entry
...
point that covers templates and non-templates. This should eliminate
the flood of warnings I introduced yesterday.
Removed the ActOnClassTemplate action, which is no longer used.
llvm-svn: 76881
2009-07-23 16:36:45 +00:00
Douglas Gregor
2aff97c9e6
Unbreak the CMake build
...
llvm-svn: 76878
2009-07-23 15:15:06 +00:00
Zhongxing Xu
ee5d708e55
Add two nodes to the call graph:
...
- Root is the main function or 0.
- ExternalCallingNode has edges to all external functions.
llvm-svn: 76876
2009-07-23 13:39:38 +00:00
Zhongxing Xu
a598e5c9d5
Add template specializations to view the call graph in dot format.
...
- change the DenseMap used in callgraph to std::map, since DenseMap cannot
be used with mapped_iterator and friends.
llvm-svn: 76874
2009-07-23 09:04:23 +00:00
Zhongxing Xu
fdd52922c2
constify methods.
...
llvm-svn: 76873
2009-07-23 08:32:25 +00:00
Daniel Dunbar
7c02cf609d
Shield clang from LLVM API changes, until the dust settles.
...
llvm-svn: 76862
2009-07-23 05:30:36 +00:00
Daniel Dunbar
a2f7c95dca
Use llvm::BitVector instead of managing memory by hand.
...
- As it happens, this also fixes a use-of-uninitialized memory that was causing
non-deterministic test failures.
llvm-svn: 76857
2009-07-23 05:01:54 +00:00
Anders Carlsson
f55922b8b8
Set field info for unions.
...
llvm-svn: 76856
2009-07-23 04:59:05 +00:00
Anders Carlsson
718a89a501
Use arrays as union padding. Also, since the resulting struct will always contain a single element and either a single i8 element or an array of i8s, there's no reason to use a packed struct.
...
llvm-svn: 76854
2009-07-23 04:50:01 +00:00
Daniel Dunbar
8e31e77fd8
Revert r76831, there are many Analyzer test failures on multiple platforms.
...
--- Reverse-merging r76831 into '.':
U include/clang/Analysis/PathSensitive/GRExprEngine.h
U lib/Analysis/GRExprEngine.cpp
llvm-svn: 76851
2009-07-23 04:41:06 +00:00
Anders Carlsson
f814ee6003
Handle zero width bit fields in unions correctly (by ignoring them).
...
llvm-svn: 76847
2009-07-23 04:00:39 +00:00
Anders Carlsson
697f65943d
Implement union layout support.
...
llvm-svn: 76846
2009-07-23 03:43:54 +00:00
Anders Carlsson
307846fe67
Check in CGRecordLayoutBuilder which is a reimplementation of the record layout code. (Yay, no more packed structs unless absolutely necessary). We currently don't use the layouts being built but that will change when the new code is mature enough :)
...
llvm-svn: 76845
2009-07-23 03:17:50 +00:00
Daniel Dunbar
a244814e6f
These IRgen improvements have been done.
...
Technically we could still do a bit more to avoid deferred generation of statics
which we know are used, but I seriously doubt this is important.
llvm-svn: 76844
2009-07-23 03:03:07 +00:00
Ted Kremenek
c5b4c0ec64
Add initial implementation of checking for uses of floating point as a loop counter.
...
llvm-svn: 76833
2009-07-23 01:07:19 +00:00
Ted Kremenek
5939402e2c
Add 'previsit' Checker pass for ObjCMessageExprs.
...
llvm-svn: 76831
2009-07-23 01:05:31 +00:00
Steve Naroff
8e6aee5821
Remove a bunch of FIXME's related to ObjC type checking.
...
- Move Sema::ObjCQualifiedIdTypesAreCompatible(), Sema::QualifiedIdConformsQualifiedId(), and a couple helper functions to ASTContext.
- Change ASTContext::canAssignObjCInterfaces() to use ASTContext:: ObjCQualifiedIdTypesAreCompatible().
- Tweak several test cases to accommodate the new/improved type checking.
llvm-svn: 76830
2009-07-23 01:01:38 +00:00
Fariborz Jahanian
0228bc1a41
Add constructor used to initialize base/member in
...
CXXBaseOrMemberInitializer AST node. Needed by
its clients to do the initialization.
llvm-svn: 76826
2009-07-23 00:42:24 +00:00
Mike Stump
671cc00ce1
Fix case, apparently some people still build on case sensitive
...
filesystems.
llvm-svn: 76824
2009-07-23 00:20:25 +00:00
Mike Stump
33979f75a0
Add warning for falling off the end of a function that should return a
...
value. This is on by default, and controlled by -Wreturn-type (-Wmost
-Wall). I believe there should be very few false positives, though
the most interesting case would be:
int() { bar(); }
when bar does:
bar() { while (1) ; }
Here, we assume functions return, unless they are marked with the
noreturn attribute. I can envision a fixit note for functions that
never return normally that don't have a noreturn attribute to add a
noreturn attribute.
If anyone spots other false positives, let me know!
llvm-svn: 76821
2009-07-22 23:56:57 +00:00
Douglas Gregor
e93e46c690
Implement support for out-of-line definitions of the class members of class
...
templates, e.g.,
template<typename T>
struct Outer {
struct Inner;
};
template<typename T>
struct Outer<T>::Inner {
// ...
};
Implementing this feature required some extensions to ActOnTag, which
now takes a set of template parameter lists, and is the precursor to
removing the ActOnClassTemplate function from the parser Action
interface. The reason for this approach is simple: the parser cannot
tell the difference between a class template definition and the
definition of a member of a class template; both have template
parameter lists, and semantic analysis determines what that template
parameter list means.
There is still some cleanup to do with ActOnTag and
ActOnClassTemplate. This commit provides the basic functionality we
need, however.
llvm-svn: 76820
2009-07-22 23:48:44 +00:00
Eli Friedman
f32f0a7146
Fix test breakage.
...
llvm-svn: 76816
2009-07-22 23:24:42 +00:00
Mike Stump
8dd1b6bd10
Improve CFG support for C++ throw expressions.
...
llvm-svn: 76814
2009-07-22 22:56:04 +00:00
Ted Kremenek
bfd28fd596
Refactor 'PostStmt' and 'PreStmt' to subclass a common parent 'StmtPoint'.
...
Educate GRExprEngine::VisitGraph() about 'PreStmt'.
Mark the constructor of 'PostStmt' to be explicit, preventing implicit
conversions and the selection of the wrong 'generateNode' method in
GRStmtNodeBuilder.
Constify a bunch of arguments, which falls out of the changes to ProgramPoint.
llvm-svn: 76809
2009-07-22 22:35:28 +00:00
Eli Friedman
6aea57560f
Slight code reorganization to allow instantiating post-inc/dec.
...
llvm-svn: 76807
2009-07-22 22:25:00 +00:00
Douglas Gregor
1a7ba62e3a
Calls to Sema::MatchTemplateParametersToScopeSpecifier should not depend on the order of evaluation of their arguments to be correct.
...
llvm-svn: 76804
2009-07-22 22:05:02 +00:00
Ted Kremenek
915c351496
Migrate the path-sensitive checking of 'nonnull' arguments over to the new
...
'Checker' interface. An updated test case illustrates that after calling a
function with the 'nonnull' attribute we now register the fact that the passed
pointer must be non-null. This retention of information was not possible with
the previously used GRSimpleAPICheck interface.
llvm-svn: 76797
2009-07-22 21:46:56 +00:00
Eli Friedman
3af2a77717
Fix the parsing of default arguments for inline member function
...
definitions.
I'm not very familiar with this code, so please review.
llvm-svn: 76796
2009-07-22 21:45:50 +00:00
Ted Kremenek
b1c170e64b
Make 'SaveAndRestore' and friends reusable classes in libAnalysis.
...
llvm-svn: 76795
2009-07-22 21:45:16 +00:00
Ted Kremenek
49513ccaec
Add support for registering 'Checker' objects with GRExprEngine.
...
Add a 'previsit' stage (that dispatches to registered Checkers) when evaluating the effects of CallExprs.
llvm-svn: 76794
2009-07-22 21:43:51 +00:00
Ted Kremenek
2776079844
Add support for 'PreStmt' program points to GRCoreEngine and GRStmtNodeBuilder.
...
llvm-svn: 76792
2009-07-22 21:40:46 +00:00
Douglas Gregor
d6605dbbc0
Fix the problems with template argument deduction and array types for
...
real. It turns out that we need to actually move all of the qualifiers
up to the array type itself, then recanonicalize the deduced template
argument type.
llvm-svn: 76788
2009-07-22 21:30:48 +00:00
Douglas Gregor
b77af8f4aa
Fix some memory allocation/deallocation issues
...
llvm-svn: 76783
2009-07-22 20:55:49 +00:00
Eli Friedman
2729132ec3
Fix a nasty little use-after-free bug.
...
llvm-svn: 76779
2009-07-22 20:29:16 +00:00
Douglas Gregor
7ac44f4cfb
Canonicalize the types produced by template argument deduction.
...
llvm-svn: 76777
2009-07-22 20:25:36 +00:00
Fariborz Jahanian
f87fbc058d
Improved on performance of the algorithm for proper ordering of
...
ctor's initialization of bases and fields.
llvm-svn: 76776
2009-07-22 20:25:00 +00:00
Douglas Gregor
6045482792
Improve template argument deduction for array types, so that a parameter
...
const T
can be matched with, e.g.,
volatile int [5]
llvm-svn: 76773
2009-07-22 20:02:25 +00:00
Mike Stump
212005c1b4
Use isa instead of dyn_cast for conditionals.
...
llvm-svn: 76771
2009-07-22 18:58:19 +00:00
Devang Patel
06cceef545
Use DICompositeType->replaceAllUsesWith().
...
This requires llvm rev. 76769 or higher.
llvm-svn: 76770
2009-07-22 18:57:00 +00:00
Douglas Gregor
8a27391190
"This patch implements the restrictions on union members detailed in
...
[class.union]p1", from John McCall!
llvm-svn: 76766
2009-07-22 18:25:24 +00:00
Ted Kremenek
f1282074c3
Move bug reporter "visitors" to their own file and make them part of the public
...
BugReporter API. No real functionality change.
llvm-svn: 76760
2009-07-22 17:55:28 +00:00
Fariborz Jahanian
5c14ec30cd
Allocate BaseOrMemberInitializers and CXXBaseSpecifier nodes
...
via ASTContext.
llvm-svn: 76758
2009-07-22 17:41:53 +00:00
Douglas Gregor
b09f3d82cc
Implement parsing and semantic analysis for out-of-line definitions of static
...
data members of class templates. We don't instantiate the definitions yet,
however.
llvm-svn: 76756
2009-07-22 17:18:37 +00:00
Steve Naroff
3de6b70730
Fix a couple recent ABI regressions noticed during code review (fallout from the ObjC type system rewrite).
...
It's unfortunate that the mangling includes the low-level structs. Nevertheless, we need this for binary compatibility with GCC.
llvm-svn: 76755
2009-07-22 17:14:51 +00:00
Eli Friedman
5173349565
Switch some functions from using x86 builtins to using vector
...
operations.
llvm-svn: 76753
2009-07-22 17:08:01 +00:00
Steve Naroff
51d4f79ffa
Fix <rdar://problem/6770276> Support Class<Proto> syntax.
...
llvm-svn: 76741
2009-07-22 16:07:01 +00:00
Eli Friedman
5ac69057c0
Make vectorized floating-point comparisons work without crashing.
...
llvm-svn: 76726
2009-07-22 06:07:16 +00:00
Ted Kremenek
920ad71dab
Temporarily disable most use of region casts in RegionStoreManager,
...
instead preferring to use the a region's actual type when creating
symbols and using the QualType passed to Retrieve for implicit
casting. This preprocessor logic is temporary; eventually we will
either remove region casts or keep them.
Temporarily toggle (via preprocessor directives) that SymbolicRegions
with heap storage are not undefined, but instead should be
symbolicated. If we want to model that a SymbolicRegion is
uninitialized, we can explicitly model that by binding UndefinedVal to
that region. It turns out that we want to treat most heap objects as
being defined, not the other way around.
llvm-svn: 76720
2009-07-22 04:35:42 +00:00
Ted Kremenek
b2d0409d50
Fix a crasher in StoreManager::InvalidateRegion() caused by using the
...
'cast type' of a region to invalidate its binding. This only occurs
when using RegionStoreManager, as it records the cast type. I'm
currently considering removing the notion of a cast type (see
comments in code).
llvm-svn: 76719
2009-07-22 04:23:20 +00:00
Mon P Wang
acedf7768f
Preserve address space information through member accesses, e.g.,
...
__attribute__((address_space(1))) struct {int arr[ 3 ]; } *p1;
... = p1->arr[2]; // load from address space 1
llvm-svn: 76717
2009-07-22 03:08:17 +00:00
Mike Stump
18366cbe97
Remove an unneeded header.
...
llvm-svn: 76716
2009-07-22 01:39:14 +00:00
Fariborz Jahanian
891436d54c
Minor mod. per Doug's comment.
...
llvm-svn: 76708
2009-07-22 00:42:46 +00:00
Douglas Gregor
168190d822
Complain if we're entering the context of a dependent nested-name-specifier but
...
cannot match that nested-name-specifier to a class template or class template
partial specialization.
llvm-svn: 76704
2009-07-22 00:28:09 +00:00
Douglas Gregor
d8d297c0ac
Basic parsing and semantic analysis for out-of-line definitions of the
...
member functions of class templates, e.g.,
template<typename T>
struct X {
void f(T);
};
template<typename T> X<T>::f(T) { /* ... */ }
llvm-svn: 76692
2009-07-21 23:53:31 +00:00
Ted Kremenek
8be513822c
Fix long-lurking bug in ObjCSummaryCache revealed by Torok's recent memory
...
poisoning changes to DenseMap. We were using an iterator after it had been
invalidated by an insertion into the DenseMap.
llvm-svn: 76677
2009-07-21 23:27:57 +00:00
Fariborz Jahanian
aee31ac316
Patch to accomodate Doug's comment on default
...
destruction of base/members for each destructor AST.
llvm-svn: 76663
2009-07-21 22:36:06 +00:00
Ted Kremenek
6dec002981
Patch by Stefan Bühler: Escape text in macro expansion when emitting HTML in the HTMLRewriter.
...
This fixes PR 4602.
llvm-svn: 76647
2009-07-21 21:16:46 +00:00
Ted Kremenek
1e35dfac17
Reorder files.
...
llvm-svn: 76642
2009-07-21 21:03:50 +00:00
Ted Kremenek
ac7c7240f0
Fix PR 4594 by refactoring almost all casting logic from GRExprEngine::VisitCast
...
to SValuator::EvalCast. In the process, the StoreManagers now use this new cast
machinery, and the hack in GRExprEngine::EvalBind to handle implicit casts
involving OSAtomicCompareAndSwap and friends has been removed (and replaced with
logic closer to the logic specific to those functions).
llvm-svn: 76641
2009-07-21 21:03:30 +00:00
Daniel Dunbar
08e41d65a2
driver: Print --version on stdout, to match gcc.
...
- Patch by Jean-Daniel Dupas
llvm-svn: 76632
2009-07-21 20:06:58 +00:00
Eli Friedman
952c15dd52
Misc fixes for -Wreorder:
...
1. Make it work correctly with anonymous unions.
2. Don't compute it if the warning isn't enabled.
3. Optimize the algorithm slightly to make it linear time in the
case where we don't produce any warnings.
llvm-svn: 76630
2009-07-21 19:28:10 +00:00
Douglas Gregor
ddbf4e0c2c
Make Sema::ActOnCXXEnterDeclaratorScope robust against failures to compute
...
the declaration context, as occurs with out-of-line class template member
definitions.
llvm-svn: 76622
2009-07-21 18:59:28 +00:00
Owen Anderson
a265a3876c
Update for LLVM API change.
...
llvm-svn: 76599
2009-07-21 18:06:41 +00:00
Argyrios Kyrtzidis
33c70c9388
Consider nested-names as part of the declarator when resolving an ambiguous statement.
...
llvm-svn: 76583
2009-07-21 17:05:03 +00:00
Fariborz Jahanian
b154ecafa6
Diagnose when a destructor uses a unrelated class type as its name.
...
llvm-svn: 76577
2009-07-21 15:28:50 +00:00
Douglas Gregor
82fe3e3398
Add the location of the tag keyword into TagDecl. From Enea
...
Zaffanella, with tweaks from Abramo Bagnara.
llvm-svn: 76576
2009-07-21 14:46:17 +00:00
Duncan Sands
49c29ee43f
Disambiguate an if statement.
...
llvm-svn: 76547
2009-07-21 07:56:29 +00:00
Argyrios Kyrtzidis
8274ad5281
Remove the ASTContext parameter from Entity::getPrintableName().
...
llvm-svn: 76546
2009-07-21 07:52:21 +00:00
Owen Anderson
f319a7d6e7
Update for LLVM API change.
...
llvm-svn: 76534
2009-07-21 02:57:15 +00:00
Argyrios Kyrtzidis
3b4e2a7621
Keep only canonical Decls in Entities.
...
llvm-svn: 76532
2009-07-21 02:10:32 +00:00
Mike Stump
3557ea840b
Wire up CFG improvements for __builtin_choose_expr.
...
llvm-svn: 76531
2009-07-21 01:46:17 +00:00
Mike Stump
8d50b6aeff
Wire up CFG improvements for do { } while () when the condition is known.
...
llvm-svn: 76530
2009-07-21 01:27:50 +00:00
Mike Stump
014b3eabd1
Wire up for statement CFG improvements for conditionals that are known.
...
llvm-svn: 76529
2009-07-21 01:12:51 +00:00
Mike Stump
23a443bea7
Wire up CFG improvements for while when the condition is known.
...
llvm-svn: 76522
2009-07-21 00:38:52 +00:00
Ted Kremenek
fe12f88924
RegionStore:
...
-refactor logic for retrieving bindings from VarDecls into
RegionStoreManager::RetrieveVar()
- improve RegionStoreManager::CastRetrievedVal() and SimpleSValuate::EvalCastNL
to better handle casts of values of the same canonical type as well as
casts of LocAsInteger values.
llvm-svn: 76516
2009-07-21 00:12:07 +00:00
Argyrios Kyrtzidis
05ac8276cf
Change the semantics for Entity.
...
Entity can now refer to declarations that are not visible outside the translation unit.
It is a wrapper of a pointer union, it's either a Decl* for declarations that don't
"cross" translation units, or an EntityImpl* which is associated with the specific "visible" Decl.
Included is a test case for handling fields across translation units.
llvm-svn: 76515
2009-07-21 00:07:06 +00:00
Ryan Flynn
ed73cac647
define __STDC_VERSION__ processor token for c94
...
llvm-svn: 76514
2009-07-21 00:07:02 +00:00
Argyrios Kyrtzidis
a8cf0beeef
Implement the virtual getNextRedeclaration() for ObjCMethodDecl.
...
If it's in an ObjCContainerDecl, its "redeclaration" is the method definition in the corresponding ObjCImplDecl.
If it's in an ObjCImplDecl, its "redeclaration" is the method in the interface.
llvm-svn: 76512
2009-07-21 00:06:36 +00:00
Argyrios Kyrtzidis
1559d67b7a
Remove the ObjCCategoryImpls vector from Sema class.
...
Use ObjCInterfaceDecl::getCategoryClassMethod() and ObjCInterfaceDecl::getCategoryInstanceMethod() for the same functionality.
llvm-svn: 76510
2009-07-21 00:06:20 +00:00
Argyrios Kyrtzidis
43cee935ae
Remove Sema::LookupObjCImplementation and replace it with just calling ObjCInterfaceDecl::getImplementation().
...
llvm-svn: 76509
2009-07-21 00:06:04 +00:00
Argyrios Kyrtzidis
6d9fab7619
- Introduce ASTContext::getObjCImplementation() and ASTContext::setObjCImplementation() which use a DenseMap to associate
...
an interface/category with its implementation (if one exists).
- Introduce ObjCInterfaceDecl::get/setImplementation() and ObjCCategoryDecl::get/setImplementation() that use the above methods.
- Add a compiler error for when a category is reimplemented.
llvm-svn: 76508
2009-07-21 00:05:53 +00:00
Argyrios Kyrtzidis
b78139f74d
Handle references from ObjCIvarRefExprs.
...
llvm-svn: 76507
2009-07-21 00:05:38 +00:00
Mike Stump
0d76d075e4
Add yet more analysis for CFGs involving conditionals that are actually constant.
...
llvm-svn: 76500
2009-07-20 23:24:15 +00:00
Fariborz Jahanian
83381cc9a6
Move EmitCtorPrologue to CGCXX. Add an assert and FIXMEs.
...
llvm-svn: 76498
2009-07-20 23:18:55 +00:00
Ted Kremenek
834e2f69da
Enhanced IsReinterpreted() (RegionStore.cpp) to reason about higher-order
...
pointers.
Enhanced RegionStoreManager::Retrieve() to handle automatic casts when the
loaded value is different from the requested value. This should be refined over
time, but essentially we should always symbolicate locations as locations, and
convert them to non-locations on demand.
These changes now cause 'misc-ps.m' to pass again.
llvm-svn: 76497
2009-07-20 22:58:02 +00:00
Fariborz Jahanian
127059c7ec
Early ir-gen for constructor prologue. This is on going.
...
llvm-svn: 76493
2009-07-20 22:35:22 +00:00
Douglas Gregor
d12df6b160
Reuse VarDecl::Init to store the default argument of a ParmVarDecl,
...
reducing the size of ParmVarDecl by one pointer. Also means that we'll
properly (de-)serialize default arguments in C++ PCH files.
llvm-svn: 76487
2009-07-20 22:03:28 +00:00
Ted Kremenek
77f7fc5e85
Enhance GRExprEngine::EvalBind to handle some implicit casts from nonlocs to
...
locs and vis versa.
llvm-svn: 76483
2009-07-20 21:43:20 +00:00
Ted Kremenek
aadd463e0e
Enhance SimpleSValuator to handle nonloc::LocAsInteger -> location casts.
...
llvm-svn: 76481
2009-07-20 21:39:27 +00:00
Mike Stump
94e12450aa
Remove an apparently unused header.
...
llvm-svn: 76473
2009-07-20 21:17:53 +00:00
Ted Kremenek
a1f9c7fb3b
Add FIXME.
...
llvm-svn: 76466
2009-07-20 20:38:59 +00:00
Douglas Gregor
959cc7aaaa
When a field is variable-sized or is an array with a negative size,
...
don't replace the type of the field with 'int', from Enea Zaffanella!
llvm-svn: 76454
2009-07-20 18:55:14 +00:00
Douglas Gregor
47d2859b3e
Improve GCC compatibility by allowing static tentative definitions of
...
incomplete type (with a warning), from Enea Zaffanella!
llvm-svn: 76451
2009-07-20 18:46:59 +00:00
Ted Kremenek
af9f362840
Enhance GRBranchNodeBuilderImpl (part of GRCoreEngine) to understand the case
...
where the true or false CFGBlock* for a branch could be NULL. This will handle
the case where we can determine during CFG construction that a branch is
infeasible.
llvm-svn: 76450
2009-07-20 18:44:36 +00:00
Steve Naroff
accc488785
5 cleanups to ObjCObjectPointerType work:
...
- Remove Sema::CheckPointeeTypesForAssignment(), a temporary API I added to ease migration to ObjCObjectPointerType. Convert Sema::CheckAssignmentConstraints() to no longer depend on the temporary API.
- Sema::ConvertDeclSpecToType(): Replace a couple FIXME's with an important comment/example.
- Sema::GetTypeForDeclarator(): Get the protocol's from the interface, NOT the declspec (to support the following C typedef idiom: "typedef C<P> T; T *obj").
- Sema::ObjCQualifiedIdTypesAreCompatible(): Removed some dead code.
- ASTContext::getObjCEncodingForTypeImpl(): Some minor cleanups.
llvm-svn: 76443
2009-07-20 17:56:53 +00:00
Fariborz Jahanian
4041dfc360
Issue a more descriptive diagnostics when mis-declaring
...
a destructor.
llvm-svn: 76436
2009-07-20 17:43:15 +00:00
Zhongxing Xu
34e0370502
The children statements might be NULL. Check for this case in
...
isContainedInStatement().
llvm-svn: 76408
2009-07-20 08:28:49 +00:00
Ted Kremenek
7d3a334298
Implement FIXME in pretty-printing for StringRegions.
...
llvm-svn: 76381
2009-07-19 20:38:24 +00:00
Ted Kremenek
291e8f770e
Improve debug pretty-printing for ObjCIVarRegions.
...
llvm-svn: 76380
2009-07-19 20:36:24 +00:00
Chris Lattner
9662cd3227
enhance the goto checker to reject jumps across __block variable definitions.
...
llvm-svn: 76376
2009-07-19 20:17:11 +00:00
Daniel Dunbar
ea3060a9e5
Catch another trivial case where we can avoid emitting a separate return blcok.
...
llvm-svn: 76365
2009-07-19 08:24:34 +00:00
Daniel Dunbar
c3ab4c6c98
Detect when the current generation point is unreachable after emitting
...
expressions.
- This generally catches the important case of noreturn functions.
- With the last two changes, we are down to 152 unreachable blocks emitted on
403.gcc, vs the 1805 we started with.
llvm-svn: 76364
2009-07-19 08:23:12 +00:00
Daniel Dunbar
669521c97c
Fix thinko.
...
llvm-svn: 76362
2009-07-19 07:03:11 +00:00
Daniel Dunbar
b6adc43f6e
Avoid generation of dead code in a few more situations.
...
- Emit variable declarations as "simple", we want to avoid forcing the creation
of a dummy basic block, but still need to make the variable available for
later use.
- With that, we can now skip IRgen for other unreachable statements (which
don't define a label).
- Anders, I added two fixmes on calls to EmitVLASize, can you check them?
llvm-svn: 76361
2009-07-19 06:58:07 +00:00
Daniel Dunbar
461ea7f005
Add include needed for MSVC.
...
llvm-svn: 76359
2009-07-19 02:17:34 +00:00
Daniel Dunbar
09fd05082d
Update CMake
...
llvm-svn: 76351
2009-07-19 00:40:45 +00:00
Anders Carlsson
6d9f6f326d
Handle layout of non-virtual base classes.
...
llvm-svn: 76348
2009-07-19 00:18:47 +00:00
Anders Carlsson
118ce16bf5
Refactor field layout into a separate function.
...
llvm-svn: 76343
2009-07-18 21:48:39 +00:00
Anders Carlsson
27b50135ee
Rename NextOffset to DataSize, which better matches the Itanium C++ ABI
...
llvm-svn: 76339
2009-07-18 21:26:44 +00:00
Anders Carlsson
a4267a654b
Migrate over to the record layout builder.
...
llvm-svn: 76338
2009-07-18 21:19:52 +00:00
Argyrios Kyrtzidis
c7082933e6
Re-enable 'test/SemaTemplate/temp_class_spec_neg.cpp', after commenting out the cause of the crash.
...
llvm-svn: 76337
2009-07-18 21:18:10 +00:00
Argyrios Kyrtzidis
d6bf03c272
Introduce ASTLocation::getReferencedDecl(), for getting the declaration that the ASTLocation references.
...
llvm-svn: 76336
2009-07-18 21:17:58 +00:00
Argyrios Kyrtzidis
fb63b0a317
Handle invalid ASTLocations instead of asserting.
...
llvm-svn: 76335
2009-07-18 21:17:43 +00:00
Anders Carlsson
4f51628b02
More layout builder work.
...
llvm-svn: 76333
2009-07-18 20:50:59 +00:00
Anders Carlsson
7947433411
Add a new ASTRecordLayoutBuilder class. Not used yet.
...
llvm-svn: 76330
2009-07-18 20:20:21 +00:00
Anders Carlsson
15b73deeea
Revert r75641.
...
llvm-svn: 76327
2009-07-18 19:43:29 +00:00
Steve Naroff
4105f3eaf9
Fix typo from r76321.
...
llvm-svn: 76322
2009-07-18 15:38:31 +00:00
Steve Naroff
c277ad10f0
Remove ObjCQualifiedInterfaceType:-)
...
llvm-svn: 76321
2009-07-18 15:33:26 +00:00
Sebastian Redl
3a0ae12162
Rename file in preparation of properly implementing C-style casts in C++.
...
llvm-svn: 76318
2009-07-18 15:08:18 +00:00
Sebastian Redl
e644e19671
Enhance testing of overriding exception specs for inaccessible base exceptions.
...
llvm-svn: 76317
2009-07-18 14:32:15 +00:00
Zhongxing Xu
3f51f41779
Fix a comment.
...
llvm-svn: 76303
2009-07-18 09:26:51 +00:00
Argyrios Kyrtzidis
05898da9cb
Introduce a redecl_iterator in Decl class, so that we can do a "iterate over all declarations of the same decl" without knowing the exact type.
...
llvm-svn: 76298
2009-07-18 08:50:35 +00:00
Argyrios Kyrtzidis
fad334ce5b
Introduce the Redeclarable template class, which serves as a base type defining the common interface for Decls that can be redeclared.
...
Make FunctionDecl and VarDecl use it.
llvm-svn: 76297
2009-07-18 08:50:13 +00:00
Argyrios Kyrtzidis
194a9d8e73
Remove StmtLocResolver::VisitObjCIvarRefExpr, it was only there to avoid returning an implicit 'self' instead of the ivar.
...
Since implicit 'self' no longer has a source location, it's not needed. (plus we also want to check for a 'self' that is visible in source code)
llvm-svn: 76296
2009-07-18 08:49:56 +00:00
Argyrios Kyrtzidis
e1a8c62ce7
Don't add a SourceLocation for 'self' if it does not actually appears in the source code.
...
llvm-svn: 76295
2009-07-18 08:49:37 +00:00
Zhongxing Xu
4b9f2d082a
Replace stmt visitors with the fall back method.
...
llvm-svn: 76294
2009-07-18 08:49:07 +00:00
Ted Kremenek
e9812bdac5
Fix crash in StoreManager::NewCastRegion() when handling casts from 'id' (or whatever) to a BlockPointerType.
...
llvm-svn: 76288
2009-07-18 06:27:51 +00:00
Ted Kremenek
2c8a159b7d
Return CodeTextRegions for BlockPointerTypes in addition to FunctionPointerTypes.
...
llvm-svn: 76287
2009-07-18 06:27:01 +00:00
Ted Kremenek
0747de6aaa
Fix some fallout from CFGBuilder restructuring: all expressions that we explicitly handle have the possibility to be block-level expressions.
...
llvm-svn: 76277
2009-07-18 00:47:21 +00:00
Argyrios Kyrtzidis
91ff94d6d9
Remove getFirstDeclaration/getLatestDeclaration from FunctionDecl and VarDecl.
...
Their usefulness is questionable since redecl_iterator was introduced.
llvm-svn: 76275
2009-07-18 00:34:35 +00:00
Argyrios Kyrtzidis
6b7e376160
Remove ASTContext::getCanonicalDecl() and use Decl::getCanonicalDecl in its place.
...
llvm-svn: 76274
2009-07-18 00:34:25 +00:00
Argyrios Kyrtzidis
5614aef776
Move the functionality of ASTContext::getCanonicalDecl(), into a virtual method Decl::getCanonicalDecl().
...
llvm-svn: 76273
2009-07-18 00:34:07 +00:00
Argyrios Kyrtzidis
e842bd16ce
Resolve a location that is inside an ObjCMethodDecl.
...
llvm-svn: 76272
2009-07-18 00:33:52 +00:00