]>
granicus.if.org Git - clang/log
Ted Kremenek [Tue, 30 Mar 2010 18:24:54 +0000 (18:24 +0000)]
Change the analyzer to recognize (but ignore) assignments to isa. Fixes PR 6302.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99904
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 30 Mar 2010 18:22:15 +0000 (18:22 +0000)]
Add Support for 'warn_unused_result" attribute on
objective-c methods. (radar
7418262 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99903
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 30 Mar 2010 18:07:27 +0000 (18:07 +0000)]
Don't produce a vtable if we are just instantiating a method and the
class has no key function.
Fix PR6738.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99900
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 30 Mar 2010 17:57:47 +0000 (17:57 +0000)]
Fix FileEntry declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99896
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 30 Mar 2010 17:33:59 +0000 (17:33 +0000)]
Teach Clang's -cc1 option -print-stats to print LLVM statistics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99894
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 30 Mar 2010 16:19:37 +0000 (16:19 +0000)]
Fix a bug where we would incorrectly report an error about initializing two fields in an anonymous struct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99891
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 30 Mar 2010 15:39:27 +0000 (15:39 +0000)]
Reduce nesting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99889
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 30 Mar 2010 11:36:44 +0000 (11:36 +0000)]
Replace some constant-sized SmallVectors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99884
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Mar 2010 05:39:52 +0000 (05:39 +0000)]
make -ftime-report work even in -disable-free mode. Woo, finally.
rdar://
7781603
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99878
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 30 Mar 2010 03:43:47 +0000 (03:43 +0000)]
Remove the old vtable layout code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99869
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 30 Mar 2010 03:35:35 +0000 (03:35 +0000)]
Remove UseNewVTableCode checks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99868
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 30 Mar 2010 03:30:08 +0000 (03:30 +0000)]
Use the new function in EmitClassAggrMemberwiseCopy, fixing the same assert as seen in PR6628 but for arrays this time.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99867
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 30 Mar 2010 03:27:09 +0000 (03:27 +0000)]
Factor emitting a call to a copy constructor out into a separate function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99866
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 30 Mar 2010 03:14:41 +0000 (03:14 +0000)]
Introduce a CXXTemporariesCleanupScope RAII object and use it to cleanup the temporaries code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99865
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 30 Mar 2010 02:57:48 +0000 (02:57 +0000)]
Handle default arguments when calling copy constructors for bases or members when synthesizing a copy constructor. Fixes PR6628.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99864
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 30 Mar 2010 02:53:30 +0000 (02:53 +0000)]
Change a test to FileCheck bitcode instead of assembler.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99863
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 30 Mar 2010 02:21:54 +0000 (02:21 +0000)]
Flip the switch and use the new vtable layout code for everything. I've verified that this passes a self-host but I'll let the bots self host as well before removing the now dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99861
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 30 Mar 2010 02:08:20 +0000 (02:08 +0000)]
Update xcode project
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99860
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 30 Mar 2010 00:27:51 +0000 (00:27 +0000)]
Cache results computed by CGDebugInfo::getOrCreateFile() in a DenseMap.
This reduces '-c -g' time on one file in 403.gcc by 12%.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99857
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 29 Mar 2010 23:56:53 +0000 (23:56 +0000)]
When copying a partial diagnostic into a DependentDiagnostic, allocate
storage for that partial diagnostic via the ASTContext's
BumpPtrAllocator rather than using up slots in the ASTContext's
cache. Now that we do this, we don't have to worry about destroying
dependent diagnostics when destroying a DependentStoredDeclsMap.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99854
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 29 Mar 2010 23:34:08 +0000 (23:34 +0000)]
Optimize PartialDiagnostic's memory-allocation behavior by placing a
cache of PartialDiagnostic::Storage objects into an allocator within
the ASTContext. This eliminates a significant amount of malloc
traffic, for a 10% performance improvement in -fsyntax-only wall-clock
time with 403.gcc's combine.c.
Also, eliminate the RequireNonAbstractType hack I put in earlier,
which was but a symptom of this larger problem.
Fixes <rdar://problem/
7806091 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99849
91177308 -0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Mon, 29 Mar 2010 21:36:06 +0000 (21:36 +0000)]
provide a simpler way to get to the headers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99843
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 29 Mar 2010 20:28:52 +0000 (20:28 +0000)]
Exit early from the simple form of Sema::RequireNonAbstractType(), for
a 2.47% speedup in 403.gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99830
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Mar 2010 19:49:09 +0000 (19:49 +0000)]
When collecting virtual bases it's very important to use the canonical type of the base class. Otherwise, we might add the same virtual base class twice if the virtual base is an instantiated template. Fixes PR6251.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99829
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 29 Mar 2010 19:10:41 +0000 (19:10 +0000)]
Remove FIXME comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99828
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 29 Mar 2010 18:29:57 +0000 (18:29 +0000)]
Change 'TypeCache' from being an std::map to a llvm::DenseMap. This reduces codegen time
on one .i file from 403.gcc by 0.5%.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99823
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Mar 2010 17:55:58 +0000 (17:55 +0000)]
add support for -MQ flag to quote targets in dependency file,
PR6661, patch by Ori Avtalion!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99821
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Mar 2010 17:28:16 +0000 (17:28 +0000)]
emit signed integer subtractions as 'sub nsw', patch by
Anton Yartsev!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99817
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Mar 2010 15:08:41 +0000 (15:08 +0000)]
Another vtable layout fix, making us match gcc better.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99812
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 29 Mar 2010 14:42:08 +0000 (14:42 +0000)]
Support __attribute__((packed)) (along with other attributes) at the
end of a struct/class/union in C++, from Justin Bogner!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99811
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Mar 2010 05:40:50 +0000 (05:40 +0000)]
Handle pure virtual member functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99807
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Mar 2010 05:13:12 +0000 (05:13 +0000)]
Fix a nasty bug in the virtual base computation which would lead to us initializing virtual bases in the wrong order.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99806
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Mar 2010 03:39:46 +0000 (03:39 +0000)]
Be a bit more consistent in using operator->
This patch moves some methods from QualType to Type and changes the users to
use -> instead of .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99805
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Mar 2010 03:38:52 +0000 (03:38 +0000)]
More vtable work - it's not possible to use the new vtable code for everything by setting a flag inside CGVtable.cpp. My plan is to run some tests and bootstrap and once that's done flip the bit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99804
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Mar 2010 03:26:49 +0000 (03:26 +0000)]
More magic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99803
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Mar 2010 03:21:40 +0000 (03:21 +0000)]
Sprinkle some sed dust over check-ztt to make it work with newer clang asm output. (I am not a sed expert so this might be terribly inefficient :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99802
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Mar 2010 02:53:58 +0000 (02:53 +0000)]
Only add thunks for the most derived class. This fixes some link errors I was seeing in files generated by the vtable tester utility.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99801
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Mar 2010 02:38:51 +0000 (02:38 +0000)]
Flip the switch to always get vtables from the VTT when necessary, I've verified that clang bootstraps with this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99800
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Mar 2010 02:14:35 +0000 (02:14 +0000)]
Use the newly added function in the VTT builder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99799
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Mar 2010 02:08:26 +0000 (02:08 +0000)]
Cleanup, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99798
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Mar 2010 01:38:05 +0000 (01:38 +0000)]
Add the thunks needed by this vtable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99793
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Mar 2010 01:28:05 +0000 (01:28 +0000)]
Make sure to sort the vtable thunks by their vtable index :) With this we now pass the test from http://www.codesourcery.com/public/cxx-abi/abi-examples.html#vtable-ctor successfully.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99792
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Mar 2010 01:16:41 +0000 (01:16 +0000)]
Fix another thinko, so that flags don't depend on previous bases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99791
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Mar 2010 01:14:25 +0000 (01:14 +0000)]
When generating base ctors/dtors, we need to lookup virtual bases using the vtable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99790
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Mar 2010 01:12:13 +0000 (01:12 +0000)]
Fix thinko.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99788
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Mar 2010 01:08:49 +0000 (01:08 +0000)]
Use construction vtables when needed. This is currently guarded by -fdump-vtable-layouts since it doesn't work 100% yet :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99787
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Mar 2010 01:04:16 +0000 (01:04 +0000)]
Two bug fixes, we weren't updating the thunk index when creating the vtable initializer and we weren't storing the secondary virtual pointer indices.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99786
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 28 Mar 2010 22:48:23 +0000 (22:48 +0000)]
Make default arguments to getFunctionNoProtoType an all or nothing option (as they already are in practise).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99785
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 28 Mar 2010 22:19:17 +0000 (22:19 +0000)]
Drop default arguments no one is using.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99783
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 28 Mar 2010 21:07:49 +0000 (21:07 +0000)]
Reapply r99775 with a fix for a silly bug - we were setting the vtable pointer for all bases, even those without a vtable pointer :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99777
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 28 Mar 2010 20:55:21 +0000 (20:55 +0000)]
Looks like I broke self-host again :(.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99776
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 28 Mar 2010 20:34:31 +0000 (20:34 +0000)]
More improvements to setting the vtable pointer. We now no longer set the vtable pointer for non-virtual primary bases. We also do a pre-order traversal of the class hierarchy; this is necessary in order to get the right vbase offset offsets in base ctors/dtors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99775
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 28 Mar 2010 19:40:00 +0000 (19:40 +0000)]
Factor vtable pointer setting code out into a separate function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99773
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 28 Mar 2010 02:42:43 +0000 (02:42 +0000)]
After performing template argument deduction for a function template,
check deduced non-type template arguments and template template
arguments against the template parameters for which they were deduced,
performing conversions as appropriate so that deduced template
arguments get the same treatment as explicitly-specified template
arguments. This is the bulk of PR6723.
Also keep track of whether deduction of a non-type template argument
came from an array bound (vs. anywhere else). With this information,
we enforce C++ [temp.deduct.type]p17, which requires exact type
matches when deduction deduces a non-type template argument from
something that is not an array bound.
Finally, when in a SFINAE context, translate the "zero sized
arrays are an extension" extension diagnostic into a hard error (for
better standard conformance), which was a minor part of PR6723.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99734
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 27 Mar 2010 21:19:47 +0000 (21:19 +0000)]
Checker: random include cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99731
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 27 Mar 2010 21:10:05 +0000 (21:10 +0000)]
Further improvement to point to category
whose protocolls methods needs implementation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99730
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 27 Mar 2010 20:50:27 +0000 (20:50 +0000)]
Give thunks the same linkage as their original methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99729
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 27 Mar 2010 19:02:17 +0000 (19:02 +0000)]
Improve diagnostics on incomplete implementation
of objc classes; including which methods
need be implemented and where they come from.
WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99724
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 27 Mar 2010 16:56:20 +0000 (16:56 +0000)]
Remove VS information for analyzer until we have more real support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99720
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kovarththanan Rajaratnam [Sat, 27 Mar 2010 08:21:15 +0000 (08:21 +0000)]
s/Clangify2010.py/clangify2010.py
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99712
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 27 Mar 2010 06:55:49 +0000 (06:55 +0000)]
Accumulate all functions and classes that the effective context is
nested within, and suddenly local classes start working. Wouldn't be
necessary if I hadn't used local classes in Clang in the first place.
Or, well, wouldn't be necessary yet. :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99709
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 27 Mar 2010 05:57:59 +0000 (05:57 +0000)]
Implement method friends in class templates and fix a few related problems.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99708
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 27 Mar 2010 02:52:40 +0000 (02:52 +0000)]
Test for the previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99702
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 27 Mar 2010 02:52:14 +0000 (02:52 +0000)]
When given the magic class __cxxabiv1::__fundamental_type_info, produce
the typeinfo for the fundamental types.
Fixes PR6685.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99701
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 27 Mar 2010 01:06:58 +0000 (01:06 +0000)]
Add initial draft of web page on 'clangifty2010.py' script for analyzing VS projects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99691
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sat, 27 Mar 2010 00:47:27 +0000 (00:47 +0000)]
When mapping restrict to noalias, look for 'restrict' on the parameter variable
instead of the canonical parameter type (which has correctly dropped all such
direct qualifiers). Fixes PR6695.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99688
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 27 Mar 2010 00:20:01 +0000 (00:20 +0000)]
scan-build: set environment variable LDPLUSPLUS to 'c++-analyzer' to correctly link projects
with c++ code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99684
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 26 Mar 2010 23:36:48 +0000 (23:36 +0000)]
Fix comparison in isDiagnosticInFlight().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99667
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 26 Mar 2010 23:25:35 +0000 (23:25 +0000)]
Remove unused static function
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99666
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 26 Mar 2010 23:10:15 +0000 (23:10 +0000)]
Put function templates instantiated from friend declarations in the correct
lexical context. This is required for ADL to work properly; fixes PR6716.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99665
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 26 Mar 2010 22:59:39 +0000 (22:59 +0000)]
Compare namespaces properly when looking for redeclarations of
namespace aliases. Fixes PR6341.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99664
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 26 Mar 2010 22:57:13 +0000 (22:57 +0000)]
Fix NoReturnFunctionChecker to properly look at a function's type
when determining if it returns. Fixes <rdar://problem/
7796563 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99663
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 26 Mar 2010 22:57:10 +0000 (22:57 +0000)]
Add comment indicating that we intentionally don't add the noreturn
attribute to a FunctionDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99662
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 26 Mar 2010 22:43:07 +0000 (22:43 +0000)]
When adding initializers to a constructor, be sure that we are looking
through the bases and fields of the definition of the class in which
the constructor is declared, rather than some other declaration of
that class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99661
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 26 Mar 2010 22:41:03 +0000 (22:41 +0000)]
Driver/Darwin: Support CCC_ENABLE_NEW_DARWIN_TOOLCHAIN as an environment
override to enable use of the DarwinClang tool chain on all platforms (not just
ARM).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99660
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 26 Mar 2010 21:56:38 +0000 (21:56 +0000)]
Properly account for redeclarations when explicitly instantiating class templates.
What happens here is that we actually turn the first declaration into a
definition, regardless of whether it was actually originally a definition,
and furthermore we do this all after we've instantiated all the declarations.
This exposes a bug in my DefinitionData patch where it was only setting the
DefinitionData for previous declarations, not future declarations.
Fortunately, there's an iterator for that.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99657
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 26 Mar 2010 20:59:55 +0000 (20:59 +0000)]
When trying to determine whether one operand of a conditional
expression can be converted to the type of another, only apply the
lvalue-to-rvalue conversion to the type of the expression we're
converting, *not* the array-to-pointer or function-to-pointer
conversions. Fixes PR6595.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99652
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 26 Mar 2010 20:35:59 +0000 (20:35 +0000)]
Eliminate the non-InitializedEntity PerformCopyInitialization() and
re-route its only caller to the newer
PerformCopyInitialization(). We're down to one remaining caller of
Sema::CheckReferenceInit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99650
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 26 Mar 2010 20:17:23 +0000 (20:17 +0000)]
Make sure we don't include mm_malloc.h in this test, it includes errno.h which
we aren't always able to find on Win32.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99649
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 26 Mar 2010 20:17:17 +0000 (20:17 +0000)]
Fix 80 col violations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99648
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 26 Mar 2010 20:14:36 +0000 (20:14 +0000)]
Switch semantic analysis of the conditional operator from using
CheckReferenceInit to using the new initialization sequence code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99647
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 26 Mar 2010 19:37:38 +0000 (19:37 +0000)]
Runtime: Install the new libcc_kext.a produced by the clang_darwin compiler-rt
configuration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99641
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 26 Mar 2010 19:02:07 +0000 (19:02 +0000)]
Spell -triple correctly for %clang, not %clang_cc1.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99634
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Mar 2010 17:51:13 +0000 (17:51 +0000)]
i386-apple-darwin10 implies sse2, this option shouldn't be needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99627
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Mar 2010 17:49:16 +0000 (17:49 +0000)]
fix a case where macro expansion should be disabled, patch by
Abramo Bagnara!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99626
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Mar 2010 17:46:33 +0000 (17:46 +0000)]
merge all the macro disable tests by using filecheck.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99625
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Mar 2010 17:10:02 +0000 (17:10 +0000)]
fix a bug in paste avoidance which would cause us to accidentally
form a >>=. Patch by Abramo Bagnara, testcase by me.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99624
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Mar 2010 17:05:16 +0000 (17:05 +0000)]
xmmintrin just requires sse2, not sse3.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99623
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kovarththanan Rajaratnam [Fri, 26 Mar 2010 16:46:16 +0000 (16:46 +0000)]
No need to specify ${CMAKE_CURRENT_BINARY_DIR}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99622
91177308 -0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Fri, 26 Mar 2010 08:26:30 +0000 (08:26 +0000)]
add a slight variation of test3, where
argument list seems to be different, but in fact
is semantically equivalent; check that we do not error here
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99617
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 26 Mar 2010 07:18:04 +0000 (07:18 +0000)]
Implement new mangling for vectors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99616
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 26 Mar 2010 06:57:13 +0000 (06:57 +0000)]
Do not mark the destructor of a function parameter's type. Fixes PR6709.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99615
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 26 Mar 2010 06:35:42 +0000 (06:35 +0000)]
Revert r99612 and see if it fixes self-host.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99614
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 26 Mar 2010 05:57:46 +0000 (05:57 +0000)]
Add tests for PR6707.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99613
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 26 Mar 2010 05:53:12 +0000 (05:53 +0000)]
Don't initialize virtual pointers for primary bases, they've already been initialized.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99612
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 26 Mar 2010 05:50:28 +0000 (05:50 +0000)]
When deducing an integral template argument for a non-type template
parameter, keep the integral value exactly as it was in the source
code rather than trying to convert it to the type of the non-type
template parameter (which may still be dependent!). The value will
then be converted to the appropriate type once we check the resulting
template arguments. Fixes PR6707.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99611
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 26 Mar 2010 04:53:08 +0000 (04:53 +0000)]
Reapply r99596 with a fix: link an instantiated friend function to its
pattern if it has a body.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99610
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 26 Mar 2010 04:39:42 +0000 (04:39 +0000)]
Simplify InitializeVtablePtrs in preparation of making it work with construction vtables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99609
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 26 Mar 2010 04:23:58 +0000 (04:23 +0000)]
Add and implement CodeGenVTables::getSecondaryVirtualPointerIndex (not used yet).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99608
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 26 Mar 2010 04:14:45 +0000 (04:14 +0000)]
Didn't mean to commit this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99607
91177308 -0d34-0410-b5e6-
96231b3b80d8