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

16564 Коммитов

Автор SHA1 Сообщение Дата
Daniel Dunbar 12ce6943aa Add ASTConsumer to CompilerInstance.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88743 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 02:47:17 +00:00
Fariborz Jahanian 182f2681e7 Generate the old API when sending message to super
in a category implementation (objc 32bit api related).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88741 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 02:18:31 +00:00
Anders Carlsson 370e53864a Handle CXXDefaultArgExprs in EmitLValue. Fixes PR5484.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88735 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 01:51:50 +00:00
Douglas Gregor 66724ea67d If we attempt to add a constructor template specialization that looks
like a copy constructor to the overload set, just ignore it. This
ensures that we don't try to use such a constructor as a copy
constructor *without* triggering diagnostics at the point of
declaration.

Note that we *do* diagnose such copy constructors when explicitly
written by the user (e.g., as an explicit specialization).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88733 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 01:20:54 +00:00
Daniel Dunbar 0ff1042dda Add static version of Preprocessor::getSpelling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88732 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 01:20:48 +00:00
Daniel Dunbar 8a9f569262 Move CompilerInstance::set* methods out-of-line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88731 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 01:20:40 +00:00
Ted Kremenek 73099bfea9 Move definition of GRExprEngine::ProcessEndPath() out-of-line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88729 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 01:05:20 +00:00
Mike Stump 6779598015 Mangling support for typeinfo names.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88726 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-14 00:14:13 +00:00
Douglas Gregor fd47648b5d Revert r88718, which does NOT solve the constructor-template-as-copy-constructor issue. Big thanks to John for finding this
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88724 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 23:59:09 +00:00
Mike Stump e99cc45049 Handle descructor printing better.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88723 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 23:45:53 +00:00
Douglas Gregor 15755cb839 Template argument deduction of a non-type template parameter from a
template argument.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88722 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 23:45:44 +00:00
Douglas Gregor cad84b7c12 A constructor template cannot be instantiated to a copy
constructor. Make sure that such declarations can never be formed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88718 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 23:14:53 +00:00
Mike Stump 65d0e28583 Also track address points for primaries bases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88717 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 23:13:20 +00:00
Fariborz Jahanian 534ba90a1b Code gen. For virtual destructor call on array objects
(still part of pr5472).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88712 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 22:29:45 +00:00
Mike Stump 22efb85eb5 More VTT and constructor vtable testcases from recent work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88710 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 22:12:05 +00:00
Mike Stump 513225fd79 Add more testcase for construction vtables and VTTs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88702 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 21:55:26 +00:00
Mike Stump 2cdcbdb5e6 Add some more VTT testcases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88699 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 21:40:38 +00:00
Eli Friedman 64241fc930 Obvious fix for PR5474.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88696 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 21:23:46 +00:00
Fariborz Jahanian 6fb98d9172 Fixes a code gen. bug for array delete operator call
int 32bit abi (pr5472 related).

-This line, and those below, will be ignored--

M    lib/CodeGen/CGCXXExpr.cpp


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88695 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 21:20:14 +00:00
Anders Carlsson 8db68da430 Clear temporaries in more places.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88687 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 20:11:49 +00:00
Ted Kremenek c360775fb7 Remove test case's dependency on header file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88685 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 20:03:22 +00:00
Ted Kremenek c764d4b5b7 Add two new test cases for the Malloc/Free checker. Both have to do with
storing malloc'ed memory to global storage.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88684 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 20:00:28 +00:00
Ted Kremenek ba93087ebd Add test case that shows a leak we don't catch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88683 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 19:53:32 +00:00
Mike Stump 9326c5695f Add a testcase for the recent VTT work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88681 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 19:36:46 +00:00
Fariborz Jahanian 72c2153b46 Code gen for arrady delete operator. Fixes pr5472.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88680 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 19:27:47 +00:00
Anders Carlsson f8a9a797a4 Fix bug Doug noticed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88679 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 19:21:49 +00:00
Daniel Dunbar bb62dcb37c Add test for expr.delete p5, with a FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88678 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 19:13:56 +00:00
Devang Patel 8fae060d6e Do not store DIDescriptor directly into a container. Store MDNode directly, through TrackingVH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88677 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 19:10:24 +00:00
Mike Stump a660440263 This falls into the category of stupid pet tricks. I hate to do this,
but this is necessary to continue work on virtual vtables.  We don't
want to penalize virtual table building testcases, just because
complex virtual conversions don't yet work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88676 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 18:53:35 +00:00
Ken Dyck a85ce8a9cb add missing slashes to separator line; also testing commit access
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88675 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 18:50:18 +00:00
Ted Kremenek 2a1814a643 Use 'eq' operator, and enable regular experimental checks when --experimental-checks is passed to scan-build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88673 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 18:49:48 +00:00
Ted Kremenek 8382cf57b7 Add clang-cc option "--analyzer-experimental-internal-checks". This
option enables new "internal" checks that will eventually be turned on
by default but still require broader testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88671 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 18:46:29 +00:00
Douglas Gregor 79b680ea86 When performing copy initialization (= "implicit conversion", here) to
a class type from itself or a derived class thereof, enumerate
constructors and permit user-defined conversions to the arguments of
those constructors. This fixes the wacky implicit conversion sequence
used in std::auto_ptr's lame emulation of move semantics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88670 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 18:44:21 +00:00
Douglas Gregor afe7ec28b1 When transforming an expression statement (e.g., for template
instantiation), be sure to finish the expression statement by
providing a FullExprArg, making sure that temporaries get
destroyed. Fixes an obscure failure when parsing
llvm/LinkAllPasses.h.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88668 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 18:34:26 +00:00
Daniel Dunbar f482d59386 Add CompilerInstance utility functions for creating output files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88667 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 18:32:08 +00:00
Anders Carlsson a0fdd916bb Instead of storing CXXMethodDecls in the vtable builder, store GlobalDecls so we can represent both the complete and deleting destructors. Also, when encountering a destructor decl, emit entries for both the complete and deleting destructors. Mike, please review.
With this change, FileCheck builds and runs the clang test suite without failures!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88663 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 17:08:56 +00:00
Anders Carlsson 4b3cbeaea6 Don't bind arguments to temporaries if the argument has a reference type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88662 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 17:04:35 +00:00
Daniel Dunbar e675049aa3 Remove local splitLines reimplementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88661 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 16:46:11 +00:00
Daniel Dunbar a920483163 Add output file list to CompilerInstance, so that it can track them instead of
forcing all clients to do it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87103 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 10:37:48 +00:00
Daniel Dunbar 84c639a1a8 clang-cc: Move output file initialization closer to use.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87102 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 10:18:59 +00:00
Daniel Dunbar 3d0dab330b Simplify, in anticipation of introducing explicit action instances.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87101 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 09:57:06 +00:00
Daniel Dunbar c2f484f1f0 Add CodeCompletion consumer to CompilerInvocation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87100 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 09:36:05 +00:00
Daniel Dunbar 3a2838d142 Rework Sema code completion interface.
- Provide Sema in callbacks, instead of requiring it in constructor. This
   eliminates the need for a factory function. Clients now just pass the object
   to consume the results in directly.

 - CodeCompleteConsumer is cheap to construct, so building it whenever we are
   doing code completion is reasonable.

Doug, please review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87099 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 08:58:20 +00:00
Daniel Dunbar 0f800391ff Add CompilerInstance::createPCHExternalASTSource.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87097 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 08:21:10 +00:00
Daniel Dunbar 704e48ae75 Add CompilerInstance::has* methods for testing if the instance has a particular
subobject.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87096 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 08:20:57 +00:00
Daniel Dunbar 5eb810024d Add ASTContext to CompilerInstance.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87095 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 08:20:47 +00:00
Zhongxing Xu fc7ac8f0b9 Malloc checker basically works now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87094 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 07:48:11 +00:00
Zhongxing Xu 7b76096474 Hook up Malloc checker.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87093 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 07:25:27 +00:00
Zhongxing Xu 9400613b54 Check in a new interface of Checker, which will soon be used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87092 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 06:53:04 +00:00
Zhongxing Xu ccd373a116 GRStateManager::CurrentStmt is not used. Remove it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87091 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-13 06:04:01 +00:00