Граф коммитов

17336 Коммитов

Автор SHA1 Сообщение Дата
Anders Carlsson c0c4993d1c Add a way to get the index of a method. Assert that we have the same index for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90533 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 03:41:37 +00:00
Anders Carlsson 29202d5065 Add a premature optimization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90532 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 03:07:26 +00:00
Anders Carlsson 2fce216955 Add the method directly to the vtable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90531 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 03:06:03 +00:00
Anders Carlsson 1e2180bf32 Get rid of the PureVirtualMethods map.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90530 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 02:58:12 +00:00
Anders Carlsson bf54027d27 Move handling of pure virtual methods to AppendMethods (and rename it to AppendMethodsToVtable).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90529 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 02:56:03 +00:00
Anders Carlsson ea357223e5 Move covariant thunk handling to AppendMethods too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90528 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 02:52:22 +00:00
Anders Carlsson b73ba39f38 Move 'this' pointer adjustment thunks to AppendMethods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90527 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 02:43:50 +00:00
Eli Friedman b17daf9ab7 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90526 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 02:43:40 +00:00
Anders Carlsson adfa26773c Factor appending methods to a vtable out into a separate function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90525 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 02:39:04 +00:00
Anders Carlsson 98fdb24687 Get rid of the Thunks struct too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90524 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 02:26:15 +00:00
Anders Carlsson a875670a66 Remove the CovariantThunk struct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90523 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 02:22:02 +00:00
Anders Carlsson 4644b8bb2c Remove the GlobalDecl from the Thunk as well.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90522 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 02:14:12 +00:00
Eli Friedman 67f85fcdab Fix for PR5447: teach Evaluate to deal with floating-point conditionals.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90521 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 02:12:53 +00:00
Anders Carlsson c71a5234c0 Remove the GlobalDecl from the CovariantThunk struct, we can just look it up in the Methods table now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90519 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 02:11:21 +00:00
Anders Carlsson a7f1911db2 Start populating the VtableMembers structure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90517 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 02:08:24 +00:00
Ted Kremenek d02e83a548 Allow BlockInvocationContext to wrap either a BlockDecl* or a BlockDataRegion*, giving us choice in our degree of context-sensitivity.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90516 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 02:03:51 +00:00
Anders Carlsson c7ab1a8dfc Add a data structure for efficient storing of vtable methods. Not used yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90515 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 02:01:07 +00:00
Mike Stump 0a3816e566 Fixup reference binding for catch parameters.
Fixup throws and rethrows to use invoke as appropriate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90513 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 01:51:45 +00:00
Eli Friedman 13a5be10b1 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90510 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 01:30:56 +00:00
Ted Kremenek 0ee4124012 Refactor LocationContext creation logic into a single member template.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90509 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 01:28:56 +00:00
Ted Kremenek dc0d909f0f Refactor FoldingSet profiling code for LocationContexts, and add a new BlockInvocationContext to represent the invocation of a block.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90506 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 00:50:10 +00:00
Eli Friedman 9aef7263d8 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90504 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 00:30:06 +00:00
Ted Kremenek b48ad64a0e constify MemRegion* returned by MemRegionManager::getXXXRegion() methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90503 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 00:26:31 +00:00
John McCall 5023437f5a 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90500 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 00:07:04 +00:00
Ted Kremenek bcd7f9f8cb More template-logic for MemRegion construction out of MemRegion.h and into MemRegion.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90499 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-04 00:05:57 +00:00
Mike Stump 3faae56c3b These are done.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90494 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 22:55:42 +00:00
Mike Stump d9cb7e9732 Improve catch parameter bindings for scalar non-pointers. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90492 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 22:38:15 +00:00
John McCall d001454000 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90491 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 22:31:13 +00:00
Eli Friedman c013118155 Add recursion guards to ice-checking and evaluation for declrefs, so we
don't infinitely recurse for cases we can't evaluate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90480 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 20:31:57 +00:00
Ted Kremenek f722770952 Try to make the output of PlistDiagnostics more deterministic by sorting PathDiagnostics before they are emitted. Fixes <rdar://problem/7439668>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90478 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 19:35:02 +00:00
Ted Kremenek d3d870b96d Convert some methods in PathDiagnostic to return StringRefs instead of std::string&.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90477 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 19:34:02 +00:00
Fariborz Jahanian e7184df728 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90470 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 18:44:40 +00:00
Daniel Dunbar ba8d86172c Fix Clang tool translation to forward -fvisibility as separate arguments, the
old syntax isn't supported.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90469 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 18:42:11 +00:00
Daniel Dunbar 93c5b915ae Add utils/TestUtils, and sink pch-test.pl there.
Also, add a test for generator a C file with a very deep call stack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90468 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 18:40:58 +00:00
Douglas Gregor 1ab537be68 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90467 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 18:33:45 +00:00
Ted Kremenek 9f303beca8 Add another blocks test case illustrating how parameters passed-by-reference in block invocations are invalidated (just like function calls).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90466 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 18:29:20 +00:00
Anders Carlsson 51f940457a When instantiating a class, if a base specifier is not dependent we still need to copy its attributes down to the instantiated class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90463 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 17:49:57 +00:00
Ted Kremenek a7a8dfd702 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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90462 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 17:48:05 +00:00
Anders Carlsson 7b0ca3fa6f Handle static_assert inside functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90461 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 17:26:31 +00:00
Douglas Gregor 1f5f3a4d58 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90460 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 17:10:37 +00:00
Douglas Gregor 109ae73ec7 Minor cleanup to the code-completion-point logic suggested by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90459 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 17:05:59 +00:00
Mike Stump c085a981ce Eli, I copied my code from this code... Let's fix the souce of the bad idea!
Thanks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90458 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 16:55:20 +00:00
Benjamin Kramer 2d09ed028a Make test 64 bit safe.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90452 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 13:09:24 +00:00
Eli Friedman 4a2251bb06 Fix for PR5659: correct a rather nasty oversight in the type conversion for
member pointer types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90450 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 12:44:31 +00:00
Daniel Dunbar bdf70c240d XFAIL this on Win32 for the time being.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90448 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 11:12:50 +00:00
Zhongxing Xu 1bf405666c Add security syntactic checker for mktemp.
Patch by Lei Zhang!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90444 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 09:15:23 +00:00
Daniel Dunbar 459cc2387e Update CMake for CallGraph.cpp move.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90443 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 09:14:19 +00:00
Daniel Dunbar baac10380c Fix two more diagnostic-on-stderr instances that thought they could hide from me -- they thought wrong.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90442 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 09:14:12 +00:00
Daniel Dunbar e7cb7e4570 Kill a few more random stderr uses.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90441 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 09:14:02 +00:00
Daniel Dunbar 28df7a5813 Convert ABIArgInfo::dump to raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90440 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 09:13:49 +00:00