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

17616 Коммитов

Автор SHA1 Сообщение Дата
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
Daniel Dunbar 36841b3636 Kill off one last exit() call.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90439 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 09:13:43 +00:00
Daniel Dunbar 33671988f1 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
2009-12-03 09:13:36 +00:00
Daniel Dunbar 360435908c 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
2009-12-03 09:13:30 +00:00
Daniel Dunbar 43adb7e9e9 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
2009-12-03 09:13:19 +00:00
Daniel Dunbar 806c12e64c 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
2009-12-03 09:13:13 +00:00
Daniel Dunbar 93ebb1ba9f Switch PCHReader::getOriginalSourceFile to use proper diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90434 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 09:13:06 +00:00
Daniel Dunbar 3be0d19503 Fix BackendConsumer to use proper diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90433 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 09:12:54 +00:00
Ted Kremenek 2ffbfd96a3 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
2009-12-03 08:25:47 +00:00
Ted Kremenek 81cef58890 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
2009-12-03 08:09:21 +00:00
Anders Carlsson 08a87f4a75 Attempt to fix the MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90427 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 07:30:40 +00:00
Daniel Dunbar 5e96f9d983 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
2009-12-03 07:23:38 +00:00
Daniel Dunbar 8fd57fea85 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
2009-12-03 07:20:04 +00:00
Daniel Dunbar 9b5e9ae08d 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
2009-12-03 07:01:58 +00:00
Daniel Dunbar b737fb12cb 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
2009-12-03 07:01:46 +00:00
Daniel Dunbar 60e107fb86 Add OptTable::PrintHelp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90420 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 07:01:38 +00:00
Daniel Dunbar 7bd716557b 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
2009-12-03 05:32:40 +00:00
Daniel Dunbar e14b5f5237 Add clang -cc1 support for -remap-file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90414 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 05:11:16 +00:00
Daniel Dunbar efba227cc5 Add clang -cc1 -load option.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90413 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 05:11:05 +00:00
Eli Friedman 6804fa27eb 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
2009-12-03 04:49:52 +00:00
Eli Friedman 35c98cc4c0 Minor cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90411 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03 04:27:05 +00:00