]> granicus.if.org Git - clang/log
clang
15 years agoFix regression in vtable improvements.
Eli Friedman [Fri, 4 Dec 2009 04:30:03 +0000 (04:30 +0000)]
Fix regression in vtable improvements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90540 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTry/catch statements seem to be working well enough to turn on.
Mike Stump [Fri, 4 Dec 2009 03:57:07 +0000 (03:57 +0000)]
Try/catch statements seem to be working well enough to turn on.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90538 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDisable for now, doesn't play nice with the temporary code.
Mike Stump [Fri, 4 Dec 2009 03:55:53 +0000 (03:55 +0000)]
Disable for now, doesn't play nice with the temporary code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90537 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename method to something easier to search for.
Eli Friedman [Fri, 4 Dec 2009 03:54:56 +0000 (03:54 +0000)]
Rename method to something easier to search for.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90536 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMore work in preparation of getting rid of the submethods loop.
Anders Carlsson [Fri, 4 Dec 2009 03:52:52 +0000 (03:52 +0000)]
More work in preparation of getting rid of the submethods loop.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90535 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove an unused member variable.
Anders Carlsson [Fri, 4 Dec 2009 03:46:21 +0000 (03:46 +0000)]
Remove an unused member variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90534 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a way to get the index of a method. Assert that we have the same index for now.
Anders Carlsson [Fri, 4 Dec 2009 03:41:37 +0000 (03:41 +0000)]
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

15 years agoAdd a premature optimization.
Anders Carlsson [Fri, 4 Dec 2009 03:07:26 +0000 (03:07 +0000)]
Add a premature optimization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90532 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd the method directly to the vtable.
Anders Carlsson [Fri, 4 Dec 2009 03:06:03 +0000 (03:06 +0000)]
Add the method directly to the vtable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90531 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGet rid of the PureVirtualMethods map.
Anders Carlsson [Fri, 4 Dec 2009 02:58:12 +0000 (02:58 +0000)]
Get rid of the PureVirtualMethods map.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90530 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove handling of pure virtual methods to AppendMethods (and rename it to AppendMethod...
Anders Carlsson [Fri, 4 Dec 2009 02:56:03 +0000 (02:56 +0000)]
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

15 years agoMove covariant thunk handling to AppendMethods too.
Anders Carlsson [Fri, 4 Dec 2009 02:52:22 +0000 (02:52 +0000)]
Move covariant thunk handling to AppendMethods too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90528 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove 'this' pointer adjustment thunks to AppendMethods.
Anders Carlsson [Fri, 4 Dec 2009 02:43:50 +0000 (02:43 +0000)]
Move 'this' pointer adjustment thunks to AppendMethods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90527 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake functions returning a struct indirectly evaluate the returned struct
Eli Friedman [Fri, 4 Dec 2009 02:43:40 +0000 (02:43 +0000)]
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

15 years agoFactor appending methods to a vtable out into a separate function.
Anders Carlsson [Fri, 4 Dec 2009 02:39:04 +0000 (02:39 +0000)]
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

15 years agoGet rid of the Thunks struct too.
Anders Carlsson [Fri, 4 Dec 2009 02:26:15 +0000 (02:26 +0000)]
Get rid of the Thunks struct too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90524 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove the CovariantThunk struct.
Anders Carlsson [Fri, 4 Dec 2009 02:22:02 +0000 (02:22 +0000)]
Remove the CovariantThunk struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90523 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove the GlobalDecl from the Thunk as well.
Anders Carlsson [Fri, 4 Dec 2009 02:14:12 +0000 (02:14 +0000)]
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

15 years agoFix for PR5447: teach Evaluate to deal with floating-point conditionals.
Eli Friedman [Fri, 4 Dec 2009 02:12:53 +0000 (02:12 +0000)]
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

15 years agoRemove the GlobalDecl from the CovariantThunk struct, we can just look it up in the...
Anders Carlsson [Fri, 4 Dec 2009 02:11:21 +0000 (02:11 +0000)]
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

15 years agoStart populating the VtableMembers structure.
Anders Carlsson [Fri, 4 Dec 2009 02:08:24 +0000 (02:08 +0000)]
Start populating the VtableMembers structure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90517 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAllow BlockInvocationContext to wrap either a BlockDecl* or a BlockDataRegion*, givin...
Ted Kremenek [Fri, 4 Dec 2009 02:03:51 +0000 (02:03 +0000)]
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

15 years agoAdd a data structure for efficient storing of vtable methods. Not used yet.
Anders Carlsson [Fri, 4 Dec 2009 02:01:07 +0000 (02:01 +0000)]
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

15 years agoFixup reference binding for catch parameters.
Mike Stump [Fri, 4 Dec 2009 01:51:45 +0000 (01:51 +0000)]
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

15 years agoUpdate chunk of #if 0'ed code to remove fixed FIXME and make it compile. We
Eli Friedman [Fri, 4 Dec 2009 01:30:56 +0000 (01:30 +0000)]
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

15 years agoRefactor LocationContext creation logic into a single member template.
Ted Kremenek [Fri, 4 Dec 2009 01:28:56 +0000 (01:28 +0000)]
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

15 years agoRefactor FoldingSet profiling code for LocationContexts, and add a new BlockInvocatio...
Ted Kremenek [Fri, 4 Dec 2009 00:50:10 +0000 (00:50 +0000)]
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

15 years agoFix for PR5679: make __builtin_prefetch a bit more flexible in what it accepts
Eli Friedman [Fri, 4 Dec 2009 00:30:06 +0000 (00:30 +0000)]
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

15 years agoconstify MemRegion* returned by MemRegionManager::getXXXRegion() methods.
Ted Kremenek [Fri, 4 Dec 2009 00:26:31 +0000 (00:26 +0000)]
constify MemRegion* returned by MemRegionManager::getXXXRegion() methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90503 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen recovering from an invalid forward reference to an enum type in C++,
John McCall [Fri, 4 Dec 2009 00:07:04 +0000 (00:07 +0000)]
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

15 years agoMore template-logic for MemRegion construction out of MemRegion.h and into MemRegion...
Ted Kremenek [Fri, 4 Dec 2009 00:05:57 +0000 (00:05 +0000)]
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

15 years agoThese are done.
Mike Stump [Thu, 3 Dec 2009 22:55:42 +0000 (22:55 +0000)]
These are done.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90494 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImprove catch parameter bindings for scalar non-pointers. WIP.
Mike Stump [Thu, 3 Dec 2009 22:38:15 +0000 (22:38 +0000)]
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

15 years agoLift the ObjCPropertyCallback out of local scope to unbreak VS2005 builds.
John McCall [Thu, 3 Dec 2009 22:31:13 +0000 (22:31 +0000)]
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

15 years agoAdd recursion guards to ice-checking and evaluation for declrefs, so we
Eli Friedman [Thu, 3 Dec 2009 20:31:57 +0000 (20:31 +0000)]
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

15 years agoTry to make the output of PlistDiagnostics more deterministic by sorting PathDiagnost...
Ted Kremenek [Thu, 3 Dec 2009 19:35:02 +0000 (19:35 +0000)]
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

15 years agoConvert some methods in PathDiagnostic to return StringRefs instead of std::string&.
Ted Kremenek [Thu, 3 Dec 2009 19:34:02 +0000 (19:34 +0000)]
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

15 years agoA new helper function to set various bits in the class when
Fariborz Jahanian [Thu, 3 Dec 2009 18:44:40 +0000 (18:44 +0000)]
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

15 years agoFix Clang tool translation to forward -fvisibility as separate arguments, the
Daniel Dunbar [Thu, 3 Dec 2009 18:42:11 +0000 (18:42 +0000)]
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

15 years agoAdd utils/TestUtils, and sink pch-test.pl there.
Daniel Dunbar [Thu, 3 Dec 2009 18:40:58 +0000 (18:40 +0000)]
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

15 years agoUnify the end-of-class code paths used by the parser and template
Douglas Gregor [Thu, 3 Dec 2009 18:33:45 +0000 (18:33 +0000)]
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

15 years agoAdd another blocks test case illustrating how parameters passed-by-reference in block...
Ted Kremenek [Thu, 3 Dec 2009 18:29:20 +0000 (18:29 +0000)]
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

15 years agoWhen instantiating a class, if a base specifier is not dependent we still need to...
Anders Carlsson [Thu, 3 Dec 2009 17:49:57 +0000 (17:49 +0000)]
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

15 years agoTweak handling of BlockDataRegions in RegionStoreManager::RemoveDeadBindings(): ...
Ted Kremenek [Thu, 3 Dec 2009 17:48:05 +0000 (17:48 +0000)]
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

15 years agoHandle static_assert inside functions.
Anders Carlsson [Thu, 3 Dec 2009 17:26:31 +0000 (17:26 +0000)]
Handle static_assert inside functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90461 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen we're building a CXXExprWithTemporaries, only include those
Douglas Gregor [Thu, 3 Dec 2009 17:10:37 +0000 (17:10 +0000)]
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

15 years agoMinor cleanup to the code-completion-point logic suggested by Chris.
Douglas Gregor [Thu, 3 Dec 2009 17:05:59 +0000 (17:05 +0000)]
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

15 years agoEli, I copied my code from this code... Let's fix the souce of the bad idea!
Mike Stump [Thu, 3 Dec 2009 16:55:20 +0000 (16:55 +0000)]
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

15 years agoMake test 64 bit safe.
Benjamin Kramer [Thu, 3 Dec 2009 13:09:24 +0000 (13:09 +0000)]
Make test 64 bit safe.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90452 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix for PR5659: correct a rather nasty oversight in the type conversion for
Eli Friedman [Thu, 3 Dec 2009 12:44:31 +0000 (12:44 +0000)]
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

15 years agoXFAIL this on Win32 for the time being.
Daniel Dunbar [Thu, 3 Dec 2009 11:12:50 +0000 (11:12 +0000)]
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

15 years agoAdd security syntactic checker for mktemp.
Zhongxing Xu [Thu, 3 Dec 2009 09:15:23 +0000 (09:15 +0000)]
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

15 years agoUpdate CMake for CallGraph.cpp move.
Daniel Dunbar [Thu, 3 Dec 2009 09:14:19 +0000 (09:14 +0000)]
Update CMake for CallGraph.cpp move.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90443 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix two more diagnostic-on-stderr instances that thought they could hide from me...
Daniel Dunbar [Thu, 3 Dec 2009 09:14:12 +0000 (09:14 +0000)]
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

15 years agoKill a few more random stderr uses.
Daniel Dunbar [Thu, 3 Dec 2009 09:14:02 +0000 (09:14 +0000)]
Kill a few more random stderr uses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90441 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoConvert ABIArgInfo::dump to raw_ostream.
Daniel Dunbar [Thu, 3 Dec 2009 09:13:49 +0000 (09:13 +0000)]
Convert ABIArgInfo::dump to raw_ostream.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90440 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoKill off one last exit() call.
Daniel Dunbar [Thu, 3 Dec 2009 09:13:43 +0000 (09:13 +0000)]
Kill off one last exit() call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90439 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse llvm_report_error instead of fprintf + assert + exit.
Daniel Dunbar [Thu, 3 Dec 2009 09:13:36 +0000 (09:13 +0000)]
Use llvm_report_error instead of fprintf + assert + exit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90438 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix CompilerInstance::createOutputFile to use proper diagnostics, and (try to) update...
Daniel Dunbar [Thu, 3 Dec 2009 09:13:30 +0000 (09:13 +0000)]
Fix CompilerInstance::createOutputFile to use proper diagnostics, and (try to) update all clients to be able to handle failure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90437 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove an unnecessary (I believe) exit() on error.
Daniel Dunbar [Thu, 3 Dec 2009 09:13:19 +0000 (09:13 +0000)]
Remove an unnecessary (I believe) exit() on error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90436 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoConvert StmtDumper to raw_ostream. I forget why.
Daniel Dunbar [Thu, 3 Dec 2009 09:13:13 +0000 (09:13 +0000)]
Convert StmtDumper to raw_ostream. I forget why.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90435 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSwitch PCHReader::getOriginalSourceFile to use proper diagnostics.
Daniel Dunbar [Thu, 3 Dec 2009 09:13:06 +0000 (09:13 +0000)]
Switch PCHReader::getOriginalSourceFile to use proper diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90434 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix BackendConsumer to use proper diagnostics.
Daniel Dunbar [Thu, 3 Dec 2009 09:12:54 +0000 (09:12 +0000)]
Fix BackendConsumer to use proper diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90433 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd value invalidation logic for block-captured variables. Conceptually invoking...
Ted Kremenek [Thu, 3 Dec 2009 08:25:47 +0000 (08:25 +0000)]
Add value invalidation logic for block-captured variables.  Conceptually invoking a block (without specific reasoning of what the block does) can invalidate any value to it by reference when the block was created.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90431 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake BlockDataRegion::referenced_vars_iterator an actual class that enforces that...
Ted Kremenek [Thu, 3 Dec 2009 08:09:21 +0000 (08:09 +0000)]
Make BlockDataRegion::referenced_vars_iterator an actual class that enforces that all MemRegions iterated over are VarRegions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90430 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAttempt to fix the MSVC build.
Anders Carlsson [Thu, 3 Dec 2009 07:30:40 +0000 (07:30 +0000)]
Attempt to fix the MSVC build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90427 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoclang-cc: Move to CompilerInvocation based command line parsing.
Daniel Dunbar [Thu, 3 Dec 2009 07:23:38 +0000 (07:23 +0000)]
clang-cc: Move to CompilerInvocation based command line parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90426 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix layering violation by moving Analysis/CallGraph to Index
Daniel Dunbar [Thu, 3 Dec 2009 07:20:04 +0000 (07:20 +0000)]
Fix layering violation by moving Analysis/CallGraph to Index

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90424 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoclang-cc: Honor -help and -version when using new style option parsing.
Daniel Dunbar [Thu, 3 Dec 2009 07:01:58 +0000 (07:01 +0000)]
clang-cc: Honor -help and -version when using new style option parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90422 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCC1Options: Normalize meta var spellings, and fix a few help texts.
Daniel Dunbar [Thu, 3 Dec 2009 07:01:46 +0000 (07:01 +0000)]
CC1Options: Normalize meta var spellings, and fix a few help texts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90421 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd OptTable::PrintHelp.
Daniel Dunbar [Thu, 3 Dec 2009 07:01:38 +0000 (07:01 +0000)]
Add OptTable::PrintHelp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90420 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate test and CIndex to use -FOO BAR form for -{remap-file,code-completion-at}.
Daniel Dunbar [Thu, 3 Dec 2009 05:32:40 +0000 (05:32 +0000)]
Update test and CIndex to use -FOO BAR form for -{remap-file,code-completion-at}.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90416 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd clang -cc1 support for -remap-file.
Daniel Dunbar [Thu, 3 Dec 2009 05:11:16 +0000 (05:11 +0000)]
Add clang -cc1 support for -remap-file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90414 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd clang -cc1 -load option.
Daniel Dunbar [Thu, 3 Dec 2009 05:11:05 +0000 (05:11 +0000)]
Add clang -cc1 -load option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90413 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix thunk generation for thunks with a parameter with reference type.
Eli Friedman [Thu, 3 Dec 2009 04:49:52 +0000 (04:49 +0000)]
Fix thunk generation for thunks with a parameter with reference type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90412 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMinor cleanup.
Eli Friedman [Thu, 3 Dec 2009 04:27:05 +0000 (04:27 +0000)]
Minor cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90411 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoHonor using declarations in overload resolution. Most of the code for
John McCall [Thu, 3 Dec 2009 04:06:58 +0000 (04:06 +0000)]
Honor using declarations in overload resolution.  Most of the code for
overloaded-operator resolution is wildly untested, but the parallel code for
methods seems to satisfy some trivial tests.

Also change some overload-resolution APIs to take a type instead of an expression,
which lets us avoid creating a spurious CXXThisExpr when resolving implicit
member accesses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90410 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support for thunking dtors. Oh why does this make my head hurt?
Mike Stump [Thu, 3 Dec 2009 03:47:56 +0000 (03:47 +0000)]
Add support for thunking dtors.  Oh why does this make my head hurt?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90409 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReflow.
Mike Stump [Thu, 3 Dec 2009 03:40:14 +0000 (03:40 +0000)]
Reflow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90407 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert r90402 for now, virt.cpp is failing.
Anders Carlsson [Thu, 3 Dec 2009 03:28:24 +0000 (03:28 +0000)]
Revert r90402 for now, virt.cpp is failing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90406 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd batch version of 'StoreManager::InvalidateRegion()' for invalidating multiple...
Ted Kremenek [Thu, 3 Dec 2009 03:27:11 +0000 (03:27 +0000)]
Add batch version of 'StoreManager::InvalidateRegion()' for invalidating multiple regions as once.  After adopting this in the CFRefCount::EvalCall(), we see a reduction in analysis time of 1.5% when analyzing all of SQLite3.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90405 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse Eli's ComputeThunkAdjustment for calculating the return adjustment.
Anders Carlsson [Thu, 3 Dec 2009 03:15:31 +0000 (03:15 +0000)]
Use Eli's ComputeThunkAdjustment for calculating the return adjustment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90402 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd CodeGenModule::ComputeThunkAdjustment, which Eli wrote.
Anders Carlsson [Thu, 3 Dec 2009 03:06:55 +0000 (03:06 +0000)]
Add CodeGenModule::ComputeThunkAdjustment, which Eli wrote.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90401 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove the index from the Thunk struct.
Anders Carlsson [Thu, 3 Dec 2009 02:41:55 +0000 (02:41 +0000)]
Remove the index from the Thunk struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90400 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChange the Thunks map to use the vtable index as the key.
Anders Carlsson [Thu, 3 Dec 2009 02:39:59 +0000 (02:39 +0000)]
Change the Thunks map to use the vtable index as the key.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90399 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd the global decl to the Thunk struct.
Anders Carlsson [Thu, 3 Dec 2009 02:36:40 +0000 (02:36 +0000)]
Add the global decl to the Thunk struct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90398 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove unused struct fields.
Anders Carlsson [Thu, 3 Dec 2009 02:34:59 +0000 (02:34 +0000)]
Remove unused struct fields.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90397 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDelay computing the return adjustments for covariant thunks until when they are added...
Anders Carlsson [Thu, 3 Dec 2009 02:32:59 +0000 (02:32 +0000)]
Delay computing the return adjustments for covariant thunks until when they are added to the vtable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90396 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNo need to create the covariant thunk in both places now.
Anders Carlsson [Thu, 3 Dec 2009 02:22:59 +0000 (02:22 +0000)]
No need to create the covariant thunk in both places now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90394 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhoops, forgot to save :)
Anders Carlsson [Thu, 3 Dec 2009 02:20:26 +0000 (02:20 +0000)]
Whoops, forgot to save :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90393 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove the index field from the CovariantThunk structure.
Anders Carlsson [Thu, 3 Dec 2009 02:16:14 +0000 (02:16 +0000)]
Remove the index field from the CovariantThunk structure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90392 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChange the CovariantThunk map to use the vtable index as its key.
Anders Carlsson [Thu, 3 Dec 2009 02:12:03 +0000 (02:12 +0000)]
Change the CovariantThunk map to use the vtable index as its key.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90391 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix typo.
Ted Kremenek [Thu, 3 Dec 2009 02:06:43 +0000 (02:06 +0000)]
Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90390 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd __has_feature(cxx_exceptions) and __has_feature(cxx_rtti) to table of contents.
Ted Kremenek [Thu, 3 Dec 2009 02:05:57 +0000 (02:05 +0000)]
Add __has_feature(cxx_exceptions) and __has_feature(cxx_rtti) to table of contents.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90389 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd section on what language features __has_feature() supports for querying if they...
Ted Kremenek [Thu, 3 Dec 2009 02:04:01 +0000 (02:04 +0000)]
Add section on what language features __has_feature() supports for querying if they are enabled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90388 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoStore a GlobalDecl in the return adjustment.
Anders Carlsson [Thu, 3 Dec 2009 02:03:29 +0000 (02:03 +0000)]
Store a GlobalDecl in the return adjustment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90387 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo not include the 'this' pointer adjustment in the covariant return type. Instead...
Anders Carlsson [Thu, 3 Dec 2009 01:58:20 +0000 (01:58 +0000)]
Do not include the 'this' pointer adjustment in the covariant return type. Instead, store it in the (now oddly named) Thunks map.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90386 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSwitch clang_createTranslationUnitFromSourceFile to use ASTUnit::LoadFromCommandLine.
Daniel Dunbar [Thu, 3 Dec 2009 01:54:28 +0000 (01:54 +0000)]
Switch clang_createTranslationUnitFromSourceFile to use ASTUnit::LoadFromCommandLine.
 - This is much faster, as it avoids the overhead of dumping an AST file to disk and reloading it.
 - For debugging purposes, there is a clang_setUseExternalASTGeneration hook which can be used to disable this.

On the Sketch Cocoa app, the speedup is pretty nice, especially when using a PCH file while scanning the source:

Wall time to c-index-test all files (no PCH):
Old: 23.4221
New: 12.3884

Wall time to c-index-test all files (with a PCH, and "local" mode):
Old: 10.9233
New:  1.9038

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90385 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove VtableBuilder::OverrideMethod out of line in preparation of other changes to...
Anders Carlsson [Thu, 3 Dec 2009 01:54:02 +0000 (01:54 +0000)]
Move VtableBuilder::OverrideMethod out of line in preparation of other changes to it. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90382 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix ASTUnit to allows require a (persistent) Diagnostic object be provided; propogate...
Daniel Dunbar [Thu, 3 Dec 2009 01:45:44 +0000 (01:45 +0000)]
Fix ASTUnit to allows require a (persistent) Diagnostic object be provided; propogate and simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90379 91177308-0d34-0410-b5e6-96231b3b80d8