Commit Graph

10352 Commits

Author SHA1 Message Date
Anders Carlsson f3935b4d4b Make sure that overridden method decls are always canonical.
llvm-svn: 90542
2009-12-04 05:51:56 +00:00
Eli Friedman 94bc2dade6 Fix regression in vtable improvements.
llvm-svn: 90540
2009-12-04 04:30:03 +00:00
Mike Stump 8c1253b4c2 Try/catch statements seem to be working well enough to turn on.
llvm-svn: 90538
2009-12-04 03:57:07 +00:00
Mike Stump 2ab55765f7 Disable for now, doesn't play nice with the temporary code.
llvm-svn: 90537
2009-12-04 03:55:53 +00:00
Eli Friedman b05eb963e0 Rename method to something easier to search for.
llvm-svn: 90536
2009-12-04 03:54:56 +00:00
Anders Carlsson a93e980fbc More work in preparation of getting rid of the submethods loop.
llvm-svn: 90535
2009-12-04 03:52:52 +00:00
Anders Carlsson f2f31f4371 Remove an unused member variable.
llvm-svn: 90534
2009-12-04 03:46:21 +00:00
Anders Carlsson e609636e0d Add a way to get the index of a method. Assert that we have the same index for now.
llvm-svn: 90533
2009-12-04 03:41:37 +00:00
Anders Carlsson b07567c315 Add a premature optimization.
llvm-svn: 90532
2009-12-04 03:07:26 +00:00
Anders Carlsson 50f147460a Add the method directly to the vtable.
llvm-svn: 90531
2009-12-04 03:06:03 +00:00
Anders Carlsson 79bce40365 Get rid of the PureVirtualMethods map.
llvm-svn: 90530
2009-12-04 02:58:12 +00:00
Anders Carlsson ddf42c8d80 Move handling of pure virtual methods to AppendMethods (and rename it to AppendMethodsToVtable).
llvm-svn: 90529
2009-12-04 02:56:03 +00:00
Anders Carlsson 5b3ea9bf1c Move covariant thunk handling to AppendMethods too.
llvm-svn: 90528
2009-12-04 02:52:22 +00:00
Anders Carlsson 86809cd8ab Move 'this' pointer adjustment thunks to AppendMethods.
llvm-svn: 90527
2009-12-04 02:43:50 +00:00
Eli Friedman 4b1942cb8b Make functions returning a struct indirectly evaluate the returned struct
directly into the sret pointer. This is an optimization in C, but is required
for correctness in C++ for classes with a non-trivial copy constructor.

llvm-svn: 90526
2009-12-04 02:43:40 +00:00
Anders Carlsson 495634e5ac Factor appending methods to a vtable out into a separate function.
llvm-svn: 90525
2009-12-04 02:39:04 +00:00
Anders Carlsson 4c837d258f Get rid of the Thunks struct too.
llvm-svn: 90524
2009-12-04 02:26:15 +00:00
Anders Carlsson c521f952d6 Remove the CovariantThunk struct.
llvm-svn: 90523
2009-12-04 02:22:02 +00:00
Anders Carlsson 597c776c41 Remove the GlobalDecl from the Thunk as well.
llvm-svn: 90522
2009-12-04 02:14:12 +00:00
Eli Friedman f3da334da6 Fix for PR5447: teach Evaluate to deal with floating-point conditionals.
llvm-svn: 90521
2009-12-04 02:12:53 +00:00
Anders Carlsson 8c889abc1a Remove the GlobalDecl from the CovariantThunk struct, we can just look it up in the Methods table now.
llvm-svn: 90519
2009-12-04 02:11:21 +00:00
Anders Carlsson cdf1898086 Start populating the VtableMembers structure.
llvm-svn: 90517
2009-12-04 02:08:24 +00:00
Ted Kremenek c7916f9ff2 Allow BlockInvocationContext to wrap either a BlockDecl* or a BlockDataRegion*, giving us choice in our degree of context-sensitivity.
llvm-svn: 90516
2009-12-04 02:03:51 +00:00
Anders Carlsson a84b6e85f0 Add a data structure for efficient storing of vtable methods. Not used yet.
llvm-svn: 90515
2009-12-04 02:01:07 +00:00
Mike Stump 114ab9f695 Fixup reference binding for catch parameters.
Fixup throws and rethrows to use invoke as appropriate.

llvm-svn: 90513
2009-12-04 01:51:45 +00:00
Eli Friedman 6d11ec8cb8 Update chunk of #if 0'ed code to remove fixed FIXME and make it compile. We
probably want to do some sort of performance assessment before enabling it,
though.

llvm-svn: 90510
2009-12-04 01:30:56 +00:00
Ted Kremenek 43d4a899c4 Refactor LocationContext creation logic into a single member template.
llvm-svn: 90509
2009-12-04 01:28:56 +00:00
Ted Kremenek 253882431e Refactor FoldingSet profiling code for LocationContexts, and add a new BlockInvocationContext to represent the invocation of a block.
llvm-svn: 90506
2009-12-04 00:50:10 +00:00
Eli Friedman 5efba264cb Fix for PR5679: make __builtin_prefetch a bit more flexible in what it accepts
as a constant integer.  Also, some minor cleanup and improvements to the
diagnostics.

llvm-svn: 90504
2009-12-04 00:30:06 +00:00
Ted Kremenek 721fcc007e constify MemRegion* returned by MemRegionManager::getXXXRegion() methods.
llvm-svn: 90503
2009-12-04 00:26:31 +00:00
John McCall 9f545181f7 When recovering from an invalid forward reference to an enum type in C++,
create the enum type in the same scope as you would a record type.

llvm-svn: 90500
2009-12-04 00:07:04 +00:00
Ted Kremenek 0ecd4c7d70 More template-logic for MemRegion construction out of MemRegion.h and into MemRegion.cpp.
llvm-svn: 90499
2009-12-04 00:05:57 +00:00
Mike Stump 5f141b75f9 These are done.
llvm-svn: 90494
2009-12-03 22:55:42 +00:00
Mike Stump 7398ff0f07 Improve catch parameter bindings for scalar non-pointers. WIP.
llvm-svn: 90492
2009-12-03 22:38:15 +00:00
John McCall 064d77b7c2 Lift the ObjCPropertyCallback out of local scope to unbreak VS2005 builds.
Make it an inner class of Parser to assuage access control.
No functionality change.

llvm-svn: 90491
2009-12-03 22:31:13 +00:00
Eli Friedman 1d6fb1669c Add recursion guards to ice-checking and evaluation for declrefs, so we
don't infinitely recurse for cases we can't evaluate.

llvm-svn: 90480
2009-12-03 20:31:57 +00:00
Ted Kremenek a3536e23c8 Try to make the output of PlistDiagnostics more deterministic by sorting PathDiagnostics before they are emitted. Fixes <rdar://problem/7439668>.
llvm-svn: 90478
2009-12-03 19:35:02 +00:00
Fariborz Jahanian 6dfc1978ac A new helper function to set various bits in the class when
a new virtual function is declared/instantiated. it is used
in couple of places.

llvm-svn: 90470
2009-12-03 18:44:40 +00:00
Daniel Dunbar e357d5689e Fix Clang tool translation to forward -fvisibility as separate arguments, the
old syntax isn't supported.

llvm-svn: 90469
2009-12-03 18:42:11 +00:00
Douglas Gregor c99f155365 Unify the end-of-class code paths used by the parser and template
instantiation, to ensure that we mark class template specilizations as
abstract when we need to and perform checking of abstract classes.

Also, move the checking that determines whether we are creating a
variable of abstract class type *after* we check whether the type is
complete. Otherwise, we won't see when we have an abstract class
template specialization that is implicitly instantiated by this
declaration. This is the "something else" that Sebastian had noted
earlier.

llvm-svn: 90467
2009-12-03 18:33:45 +00:00
Anders Carlsson ae3c5cf76a When instantiating a class, if a base specifier is not dependent we still need to copy its attributes down to the instantiated class.
llvm-svn: 90463
2009-12-03 17:49:57 +00:00
Ted Kremenek 4b349cc9c5 Tweak handling of BlockDataRegions in RegionStoreManager::RemoveDeadBindings(): only the VarRegions for variables marked with the '__block' annotation should have their lifetime extended by a BlockDataRegion.
llvm-svn: 90462
2009-12-03 17:48:05 +00:00
Anders Carlsson ce2cd01647 Handle static_assert inside functions.
llvm-svn: 90461
2009-12-03 17:26:31 +00:00
Douglas Gregor 580cd4a23e When we're building a CXXExprWithTemporaries, only include those
temporaries that are within our current evaluation context. That way,
nested evaluation contexts (e.g., within a sizeof() expression) won't
see temporaries from outer contexts. Also, make sure to push a new
evaluation context when instantiating the initializer of a variable;
this may be an unevaluated context or a potentially-evaluated context,
depending on whether it's an in-class initializer or not. Fixes PR5672.

llvm-svn: 90460
2009-12-03 17:10:37 +00:00
Douglas Gregor 5f49883488 Minor cleanup to the code-completion-point logic suggested by Chris.
llvm-svn: 90459
2009-12-03 17:05:59 +00:00
Mike Stump cdeb800152 Eli, I copied my code from this code... Let's fix the souce of the bad idea!
Thanks.

llvm-svn: 90458
2009-12-03 16:55:20 +00:00
Eli Friedman c339081c24 Fix for PR5659: correct a rather nasty oversight in the type conversion for
member pointer types.

llvm-svn: 90450
2009-12-03 12:44:31 +00:00
Zhongxing Xu 39bba629f3 Add security syntactic checker for mktemp.
Patch by Lei Zhang!

llvm-svn: 90444
2009-12-03 09:15:23 +00:00
Daniel Dunbar 98f2067ca4 Update CMake for CallGraph.cpp move.
llvm-svn: 90443
2009-12-03 09:14:19 +00:00
Daniel Dunbar 6dac935b1f Fix two more diagnostic-on-stderr instances that thought they could hide from me -- they thought wrong.
llvm-svn: 90442
2009-12-03 09:14:12 +00:00