Chris Lattner
4ca97c3b9e
Fix PR4372, another case where non-prototyped functions can prevent
...
always_inline from working.
llvm-svn: 73273
2009-06-13 00:26:38 +00:00
Anders Carlsson
327865db53
A parameter pack must always come last in a class template.
...
llvm-svn: 73269
2009-06-12 23:20:15 +00:00
Anders Carlsson
f986ba7528
Address more comments from Doug.
...
llvm-svn: 73267
2009-06-12 23:09:56 +00:00
Anders Carlsson
d382435014
Parameter packs can't have default arguments.
...
llvm-svn: 73262
2009-06-12 22:30:13 +00:00
Douglas Gregor
30b0197169
Finish implementing checking of class template partial specializations
...
llvm-svn: 73260
2009-06-12 22:21:45 +00:00
Douglas Gregor
09a3023e65
Diagnose C++ [temp.class.spec]p9b3, where a class template partial
...
specialization's arguments are identical to the implicit template
arguments of the primary template. Typically, this is meant to be a
declaration/definition of the primary template, so we give that
advice.
llvm-svn: 73259
2009-06-12 22:08:06 +00:00
Douglas Gregor
8cfd2ba76d
Diagnose the incorrect use of non-type template arguments for class
...
template partial specializations.
llvm-svn: 73254
2009-06-12 21:21:02 +00:00
Anders Carlsson
01e9e93485
Parse support for C++0x type parameter packs.
...
llvm-svn: 73247
2009-06-12 19:58:00 +00:00
Douglas Gregor
d52220513f
Verify that the template parameters of a class template partial
...
specialization do not have default arguments
(C++ [temp.class.spec]p10).
llvm-svn: 73245
2009-06-12 19:43:02 +00:00
Anders Carlsson
b0e8e228ff
Fix PR4365.
...
llvm-svn: 73240
2009-06-12 18:53:02 +00:00
Anders Carlsson
84613c4eba
It's an error to use a function declared in a class definition as a default argument before the function has been declared.
...
llvm-svn: 73234
2009-06-12 16:51:40 +00:00
Anders Carlsson
a767eeed19
Deducation and instantiation of block types.
...
llvm-svn: 73232
2009-06-12 16:23:10 +00:00
Anders Carlsson
8783543a6f
Don't assert when generating code with static_asserts.
...
llvm-svn: 73208
2009-06-11 21:22:55 +00:00
Douglas Gregor
74eba0b679
Once we have deduced the template arguments of a class template
...
partial specialization, substitute those template arguments back into
the template arguments of the class template partial specialization to
see if the results still match the original template arguments.
This code is more general than it needs to be, since we don't yet
diagnose C++ [temp.class.spec]p9. However, it's likely to be needed
for function templates.
llvm-svn: 73196
2009-06-11 18:10:32 +00:00
Anders Carlsson
40ed344c92
Add a null check that fixes the crash in PR4362, and make sure to instantiate non-type template arguments.
...
llvm-svn: 73193
2009-06-11 16:06:49 +00:00
Zhongxing Xu
519a47d4bd
Bind the mistakenly generated nonloc::SymbolVal to struct correctly. See the
...
comments for added test case for details.
llvm-svn: 73189
2009-06-11 09:11:27 +00:00
Eli Friedman
dd49ee3fb4
Make sure to calculate value-dependence correctly when deal with ICEs.
...
(Actually, this isn't precisely correct, but it doesn't make
sense to query whether an expression that isn't an ICE is
value-dependent anyway.)
llvm-svn: 73179
2009-06-11 01:11:20 +00:00
Eli Friedman
88681cce60
Move test to be with the other typename tests.
...
llvm-svn: 73178
2009-06-11 01:01:02 +00:00
Eli Friedman
6d692cc2e8
PR4364: fix parsing 'typename' in an expression.
...
llvm-svn: 73177
2009-06-11 00:33:41 +00:00
Douglas Gregor
637d9984f0
Template argument deduction for member pointers.
...
Also, introduced some of the framework for performing instantiation as
part of template argument deduction.
llvm-svn: 73175
2009-06-10 23:47:09 +00:00
Daniel Dunbar
76d864c7e7
Support complex properties, ivars and message expressions.
...
llvm-svn: 73158
2009-06-10 04:38:50 +00:00
Eli Friedman
28a00aa646
PR4353: Add support for \E as a character escape.
...
llvm-svn: 73153
2009-06-10 01:32:39 +00:00
Douglas Gregor
0bdc1f5eef
Handle member pointer types with dependent class types (e.g., int
...
T::*) and implement template instantiation for member pointer types.
llvm-svn: 73151
2009-06-09 22:17:39 +00:00
Douglas Gregor
ed74eb81e1
Example metaprogram for reversing and searching in a type list
...
llvm-svn: 73147
2009-06-09 21:22:32 +00:00
Douglas Gregor
4fbe3e3014
Implement template argument deduction for class template
...
specialization types. As the example shows, we can now compute the
length of a type-list using a template metaprogram and class template
partial specialization.
llvm-svn: 73136
2009-06-09 16:35:58 +00:00
Daniel Dunbar
fd262b4a62
Fix test, which could miss failures, and also avoid leaving temporary .i file in
...
source directory.
llvm-svn: 73094
2009-06-08 22:44:26 +00:00
Daniel Dunbar
eed62b7c4b
Add stack alignment to x86_64 target data.
...
- <rdar://problem/6948443> WARNING: Linking two modules of different data
layouts!
llvm-svn: 73093
2009-06-08 22:39:13 +00:00
Daniel Dunbar
367dbb9760
Forward -C and -CC to clang.
...
- <rdar://problem/6945384> Driver should pass down -C and -CC
llvm-svn: 73087
2009-06-08 21:48:20 +00:00
Daniel Dunbar
db09702e2a
PR4016: Forward -fno-show-source-location to clang.
...
llvm-svn: 73082
2009-06-08 21:13:54 +00:00
Anders Carlsson
096e6eeb68
Address comments from Doug.
...
llvm-svn: 73077
2009-06-08 19:22:23 +00:00
Douglas Gregor
6f998fcb1d
Test template argument deduction on function types a little more
...
llvm-svn: 73072
2009-06-08 16:04:08 +00:00
Anders Carlsson
2128ec7cdd
Template argument deduction for function types.
...
llvm-svn: 73070
2009-06-08 15:19:08 +00:00
Eli Friedman
9e81b02ec5
Don't allow defining a block with a non-prototype type. Remove a
...
hack which introduces some strange inconsistencies in compatibility
for block pointers.
Note that unlike an earlier revision proposed on cfe-commits, this patch
still allows declaring block pointers without a prototype.
llvm-svn: 73041
2009-06-08 04:24:21 +00:00
Anders Carlsson
0880e9f58d
Instantiation support for more Obj-C expressions, string literals, @selector and @protocol expressions.
...
llvm-svn: 73036
2009-06-07 19:51:47 +00:00
Anders Carlsson
315d2294f8
Template instantiation support for Obj-C @encode expressions.
...
llvm-svn: 73034
2009-06-07 18:45:35 +00:00
Eli Friedman
e9ff191459
Remove a few more vector builtins.
...
llvm-svn: 73022
2009-06-07 09:32:56 +00:00
Eli Friedman
5a996fc0fc
Now that LLVM CodeGen can handle the generic variations a bit better,
...
get rid of a few more clang vector builtins.
llvm-svn: 73015
2009-06-07 07:12:56 +00:00
Eli Friedman
07bbeca406
PR4339: make sure to properly extend/trunc the index of a vector element
...
insert/extract; the relevant instructions are defined to take only an
i32.
llvm-svn: 73005
2009-06-06 19:09:26 +00:00
Eli Friedman
5f75ff84b7
Test changes to account for removed builtins.
...
llvm-svn: 73004
2009-06-06 18:15:42 +00:00
Douglas Gregor
30018a6860
Switch CMake testing over to use Daniels new(er) Python-based infrastructure.
...
llvm-svn: 72977
2009-06-05 23:57:17 +00:00
Mike Stump
cbc2bcaf17
As an optimization, we maintain a cache of generated
...
___Block_byref_id_object_dispose and ___Block_byref_id_object_copy
functions so that we can simply reuse instead of creating a new one.
Additionally, add an assert to ensure no one yet tries to align a
__block variable beyond the alignment of a pointer as the codegen is
incomplete.
llvm-svn: 72974
2009-06-05 23:26:36 +00:00
Ted Kremenek
a03705c82d
Fix:
...
<rdar://problem/6948053> False positive: object substitution during -init* methods warns about returning +0 when using -fobjc-gc-only
llvm-svn: 72971
2009-06-05 23:18:01 +00:00
Ted Kremenek
ea1c221334
Enhance attribute cf_returns_retained to also work (in the analyzer)
...
for non-Objctive-C pointer types. This implicitly documents that the
return type is a CF object reference.
llvm-svn: 72968
2009-06-05 23:00:33 +00:00
Daniel Dunbar
feeeda70e2
weak_import should not make definitions have weak linkage.
...
- <rdar://problem/6948703> clang treats weak_import like weak
llvm-svn: 72967
2009-06-05 22:58:34 +00:00
Devang Patel
9e24386c65
Set function Attribute::NoImplicitFloat appropriately.
...
llvm-svn: 72961
2009-06-05 22:05:48 +00:00
Douglas Gregor
fa93480937
Clean up Clang regression testing in CMake, so that we get more
...
logical output when running all of the Clang regression tests at once.
llvm-svn: 72947
2009-06-05 16:26:18 +00:00
Douglas Gregor
0770532f5a
First cut at regression testing Clang with CMake
...
llvm-svn: 72945
2009-06-05 16:00:31 +00:00
Daniel Dunbar
4be99ff767
ABI handling: Fix nasty thinko where IRgen could generate an out-of-bounds read
...
when generating a coercion for ABI handling purposes.
- This may only manifest itself when building at -O0, but the practical effect
is that other arguments may get clobbered.
- <rdar://problem/6930451> [irgen] ABI coercion clobbers other arguments
llvm-svn: 72932
2009-06-05 07:58:54 +00:00
Daniel Dunbar
635b8050c4
Add an XFAIL test to demonstrate references in Obj-C++, this currently crashes.
...
llvm-svn: 72923
2009-06-05 06:03:19 +00:00
Eli Friedman
3c1291d384
Update test to work with the limited Sema for #pragma weak.
...
llvm-svn: 72914
2009-06-05 02:49:06 +00:00