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
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
Mike Stump
7a5eaf6dd4
Add some documentation, to make it so the next person doens't select
...
the wrong function. :-)
llvm-svn: 76752
2009-07-22 16:55:20 +00:00
Steve Naroff
51d4f79ffa
Fix <rdar://problem/6770276> Support Class<Proto> syntax.
...
llvm-svn: 76741
2009-07-22 16:07:01 +00:00
Ted Kremenek
952a004298
Restructure ProgramPoint to have the 'Kind' value be its own instance
...
variable. This gives us much more flexibility with defining more
ProgramPoints, which is the direction we are heading. The removal of
various bit-mangling of pointers also cleans up the logic.
llvm-svn: 76721
2009-07-22 04:38:22 +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
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
4fd8f73c93
Update stale comment.
...
llvm-svn: 76644
2009-07-21 21:09:31 +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
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
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
Argyrios Kyrtzidis
8274ad5281
Remove the ASTContext parameter from Entity::getPrintableName().
...
llvm-svn: 76546
2009-07-21 07:52:21 +00:00
Argyrios Kyrtzidis
11982922be
Add an assert for safety check.
...
llvm-svn: 76539
2009-07-21 06:48:06 +00:00
Argyrios Kyrtzidis
1a176f0b96
Fix a crash that occurs in this C++ case:
...
struct foo {
static bool value;
};
bool (foo::value); // crash because of parens
llvm-svn: 76538
2009-07-21 06:43:26 +00:00
Argyrios Kyrtzidis
3b4e2a7621
Keep only canonical Decls in Entities.
...
llvm-svn: 76532
2009-07-21 02:10:32 +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
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
60e9b7cf58
Add an assertion for the return value of Decl::getNextRedeclaration().
...
llvm-svn: 76511
2009-07-21 00:06:27 +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
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
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
c0656de03d
Improve message for bad destructor decl. Per Doug's comment.
...
llvm-svn: 76494
2009-07-20 22:41:12 +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
Mike Stump
17051250ad
Remove an apparently unused forward class decl.
...
llvm-svn: 76476
2009-07-20 21:23:55 +00:00
Ted Kremenek
619eece347
Update DataflowSolver to handle the case where a successor/predecessor block
...
could be NULL. This allows the solver to handle optimized CFGs where branches
can be determined during CFG-construction to be infeasible.
llvm-svn: 76452
2009-07-20 18:52:34 +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
Fariborz Jahanian
4041dfc360
Issue a more descriptive diagnostics when mis-declaring
...
a destructor.
llvm-svn: 76436
2009-07-20 17:43:15 +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
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
d6bf03c272
Introduce ASTLocation::getReferencedDecl(), for getting the declaration that the ASTLocation references.
...
llvm-svn: 76336
2009-07-18 21:17:58 +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
c277ad10f0
Remove ObjCQualifiedInterfaceType:-)
...
llvm-svn: 76321
2009-07-18 15:33:26 +00:00
Argyrios Kyrtzidis
fd16798b1f
Fix a comment.
...
llvm-svn: 76299
2009-07-18 08:50:48 +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
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
02675dc49d
Set ObjCMethodDecl's EndLoc to the '}' when it's a definition.
...
llvm-svn: 76269
2009-07-18 00:33:33 +00:00
Argyrios Kyrtzidis
ce55b2e543
Add getSourceRange() methods for ObjC Decls.
...
llvm-svn: 76267
2009-07-18 00:33:08 +00:00
Ted Kremenek
8a286fbdb9
Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methods
...
until Doug Gregor's Type smart pointer code lands (or more discussion occurs).
These methods just call the new Type::getAs<XXX> methods, so we still have
reduced implementation redundancy. Having explicit getAsXXXType() methods makes
it easier to set breakpoints in the debugger.
llvm-svn: 76193
2009-07-17 17:50:17 +00:00