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

30169 Коммитов

Автор SHA1 Сообщение Дата
Douglas Gregor 0cdd798dba In the AST reader, keep track of the total number of source locations
entries incrementally, rather than iterating over the chain when
loading a single AST file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135692 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 18:46:38 +00:00
Argyrios Kyrtzidis 9cca68dbfc For ASTUnit::Save, write the AST to a temporary and then rename it to the actual filename.
Should avoid race conditions. Addresses rdar://9788943.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135691 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 18:44:49 +00:00
Argyrios Kyrtzidis bc9d5a3ace Cut down one open/close pair of system calls by using Path's makeUnique instead of createTemporaryFileOnDisk.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135690 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 18:44:46 +00:00
Richard Smith ee2cdbd6dd Update cxx_status page on www: clang has had full support for in-class initializers since r132890.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135689 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 18:02:57 +00:00
Douglas Gregor 8c32708923 Clean up the C++ status page by eliminating the utterly unnecessary set of projects. C++98/03 is sooooo yesterday
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135687 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 17:46:15 +00:00
Douglas Gregor be7a1d3a3f Update C++0x nullptr status, from Jonathan Sauer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135686 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 17:41:00 +00:00
Fariborz Jahanian feb4fa165c Add FixIt hint for missing 'id' type.
// rdar://9615045


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135685 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 17:38:14 +00:00
Fariborz Jahanian aab24a616d objc - Diagnose missing method return type specifier under
a warning flag. // rdar://9615045


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135681 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 17:00:47 +00:00
Douglas Gregor 1a23f12e1e One last RandomAccessIterator operator for PreprocessingRecord::iterator
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135680 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 16:37:44 +00:00
Douglas Gregor 67029567f7 Add the remaining RandomAccessIterator operations to
PreprocessingRecord::iterator. Where's concept_map when I need it?


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135679 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 16:35:41 +00:00
Bruno Cardoso Lopes 8c24d1a294 Define the _MIPS_SIM builtin macro on MIPS platforms. Patch by Robert Millan!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135675 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 15:10:57 +00:00
Jay Foad a5c04344fa Convert ConstantExpr::getGetElementPtr and
ConstantExpr::getInBoundsGetElementPtr to use ArrayRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135673 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 14:31:17 +00:00
Francois Pichet 8d366c0e34 For some reason I don't fully comprehend, the MSVC debug build will fail with a huge 50+ lines template error message if PreprocessingRecord::iterator has no operator<()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135670 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 06:26:00 +00:00
Eric Christopher 4110e1399b Speculatively revert 135649 to bring back the g++ testing bots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135668 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 05:34:24 +00:00
Ted Kremenek 4fed22cdd8 Move AnalysisManager constructor out of line. No functionality change (yet).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135667 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 05:22:52 +00:00
Ted Kremenek bc5cb8a5fe Simplify passing of CFGBuildOptions around for AnalysisContext. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135666 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 05:22:47 +00:00
Richard Trieu 697d05d579 Fix a test in warn-sign-conversion.cpp. Removed a part of a directory path so that the directory seperator, which may change on different platforms, is no longer part of the string checked for.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135665 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 03:20:52 +00:00
Richard Trieu 5254161b26 Remove warning for conditional operands of differend signedness from -Wsign-compare. Cases that previously warn on this will have a different warning emitted from -Wsign-conversion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135664 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 02:46:28 +00:00
Douglas Gregor e081a61bb0 New libclang API to expose container type for code completion, from
Connor Wakamo!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135651 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 01:05:26 +00:00
Sean Hunt 98c6bda3be When copping out on a friend template declaration, be sure to mark its
access specifier as public.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135649 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 00:59:23 +00:00
Douglas Gregor 4c30bb148b Rework the detailed preprocessing record to separate preprocessing
entities generated directly by the preprocessor from those loaded from
the external source (e.g., the ASTReader). By separating these two
sets of entities into different vectors, we allow both to grow
independently, and eliminate the need for preallocating all of the
loaded preprocessing entities. This is similar to the way the recent
SourceManager refactoring treats FileIDs and the source location
address space.

As part of this, switch over to building a continuous range map to
track preprocessing entities.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135646 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 00:47:40 +00:00
Anna Zaks ffe9edd45f Addressing code review comments for commit 135509 - Add FixItHints in case a C++ function call is missing * or & operators on
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135643 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-21 00:34:39 +00:00
Fariborz Jahanian 40af63b91c Removes a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135640 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 23:53:57 +00:00
Fariborz Jahanian f2dd68fb37 objc-arc: Fixes a crash @throw'ing an objc message.
// pr10411


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135638 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 23:39:56 +00:00
Jonathan D. Turner e9b76c11a8 Continuing to improve and generalize how IDs are handled in ASTReader. This patch cleans up and generalizes TypeID loading and uses a similar table-lookup to Doug's previous Decl patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135622 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 21:31:32 +00:00
Chad Rosier d7a3ba03f6 Temporarily revert r135614 while I fix the cmake build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135621 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 21:16:17 +00:00
Bill Wendling e1809074d0 Remove extraneous period.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135619 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 21:02:28 +00:00
Chad Rosier 2da13b1595 When the compiler crashes, the compiler driver now produces diagnostic information
including the fully preprocessed source file(s) and command line arguments.  The 
developer is asked to attach this diagnostic information to a bug report.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135614 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 20:26:32 +00:00
Evan Cheng 66488ed140 Match MCContext change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135612 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 19:53:19 +00:00
Ted Kremenek dd4286b5b7 Fix -Wuninitialized regression involving functions invalidating parameters passed by reference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135610 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 19:49:47 +00:00
Chad Rosier 97f16dc896 Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135605 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 19:27:01 +00:00
Chad Rosier c57114ab9f If -ccc-host-triple i386-pc-win32-macho or -ccc-host-triple
x86_64-pc-win32-macho is used in conjunction with -no-integrated-as go ahead and
use the Darwin system assembler.
rdar://9785470


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135604 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 19:14:30 +00:00
Fariborz Jahanian 909bcb37c4 arc-objc++: Issue an arc specific diagnostic when overload resolution
fails because of lifetime differences of parameter and argument type.
// rdar://9790531


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135593 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 17:14:09 +00:00
NAKAMURA Takumi 582c1fb301 test/CMakeLists.txt: Re-indent.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135591 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 16:35:49 +00:00
Benjamin Kramer 77577ce8f0 Unbreak build after API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135585 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 14:43:06 +00:00
Chris Lattner 5d8179106f arrayref should now move in here, and redundant #includes of <cassert> can go
away (since it comes in through Casting.h).  This will have to wait for another
day when I'm unmotivated though, or someone else to pick it up :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135579 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 07:13:40 +00:00
Chris Lattner db999aad8a remove some now-redundant forward declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135578 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 07:12:43 +00:00
Chris Lattner 8cc488fefb add raw_ostream and Twine to LLVM.h, eliminating a ton of llvm:: qualifications.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135577 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 07:06:53 +00:00
Chris Lattner 686775deca now that we have a centralized place to do so, add some using declarations for
some common llvm types: stringref and smallvector.  This cleans up the codebase
quite a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135576 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 06:58:45 +00:00
Chris Lattner 9594675cc1 introduce a centralized place to introduce and inject llvm types into the
clang namespace.  There are a number of LLVM types that are used pervasively
and it doesn't make sense to keep qualifying them.  Start with casting
operators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135574 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 06:37:11 +00:00
Chris Lattner b13eab95e1 fix rdar://9780211 - Clang crashes with an assertion failure building WKView.mm from WebKit
This is something of a hack, the problem is as follows:

1. we instantiate both copied of RetainPtr with the two different argument types
   (an id and protocol-qualified id).
2. We refer to the ctor of one of the instantiations when introducing global "x",
   this causes us to emit an llvm::Function for a prototype whose "this" has type
   "RetainPtr<id<bork> >*".
3. We refer to the ctor of the other instantiation when introducing global "y",
   however, because it *mangles to the same name as the other ctor* we just use
   a bitcasted version of the llvm::Function we previously emitted.
4. We emit deferred declarations, causing us to emit the body of the ctor, however
   the body we emit is for RetainPtr<id>, which expects its 'this' to have an IR
   type of "RetainPtr<id>*".

Because of the mangling collision, we don't have this case, and explode.

This is really some sort of weird AST invariant violation or something, but hey
a bitcast makes the pain go away.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135572 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 06:29:00 +00:00
Chris Lattner 181eeee36b fix a case where we're using ConvertType for a memory object.
It doesn't matter in practice, but it is good to be tidy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135571 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 06:23:59 +00:00
Evan Cheng 36fc3aa1e3 Match LLVM API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135570 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 06:22:27 +00:00
Chris Lattner cb8095f766 as eli points out, we're not doing memory stuff here. While ConvertType
and ConvertTypeForMem are the same for pointers, it is best to just
use ConvertType.  Thanks Eli!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135567 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 04:59:57 +00:00
Chris Lattner 410b12e553 fix PR10395 - array decay can produce an interesting type when
decaying an array of incomplete type (which has type [0 x i8]*) to a
normal pointer (which has incompletetype*).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135565 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 04:31:01 +00:00
Douglas Gregor 14ad03b6f4 Use a ContinuousRangeMap to map from the global macro definition ID in
the AST reader down to the AST file + local ID, rather than walking
the PCH chain. More cleanup/generalization, although there is more
work to do for preprocessed entities. In particular, the
"preallocation" scheme for preprocessed entities is not going to work
well with late loading of PCH files, and it's likely we'll have to do
something akin to the SourceManager's negative/positive loading.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135556 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 01:29:15 +00:00
Douglas Gregor 96958cbe6f Use a ContinuousRangeMap to map from the global selector ID in the AST
reader down to the AST file + local ID, rather than walking the PCH
chain. No functionality change; this is generalization and cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135554 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 01:10:58 +00:00
Joerg Sonnenberger e23af2a86e PR10392: "#pragma GCC visibility" must not expand macros in its
arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135552 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 01:03:50 +00:00
Douglas Gregor 67268d0238 Use a ContinuousRangeMap to map from the global identifier ID in the
AST reader down to the AST file + local ID, rather than walking the
PCH chain. No functionality change; this is generalization and cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135551 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 00:59:32 +00:00
Douglas Gregor 07e5f1a704 Try to appease MSVC's standard library.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135549 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-20 00:31:58 +00:00