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
aa73b9135a
Improvements to TemplateArgumentListBuilder to make it work better with parameter packs.
...
llvm-svn: 73272
2009-06-13 00:08:58 +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
508caaec3b
No need to mark the parameter as invalid, just ignore the default argument.
...
llvm-svn: 73268
2009-06-12 23:13:22 +00:00
Anders Carlsson
f986ba7528
Address more comments from Doug.
...
llvm-svn: 73267
2009-06-12 23:09:56 +00:00
Chris Lattner
815b70efcd
add the location of the ')' in a do/while statement to DoStmt.
...
This fixes a source range problem reported by Olaf Krzikalla.
llvm-svn: 73266
2009-06-12 23:04:47 +00:00
Anders Carlsson
15f1dd1c88
Address comments from Doug - Add a Sema::SemaRef.BuildBlockPointerType and use it.
...
llvm-svn: 73264
2009-06-12 22:56:54 +00:00
Douglas Gregor
170bc42547
It looks like we've finished off matching of class template partial specializations; add comments and update the C++ status page
...
llvm-svn: 73263
2009-06-12 22:31:52 +00:00
Anders Carlsson
d382435014
Parameter packs can't have default arguments.
...
llvm-svn: 73262
2009-06-12 22:30:13 +00:00
Anders Carlsson
fb1d776ff0
Keep track of whether a type parameter is actually a type parameter pack.
...
llvm-svn: 73261
2009-06-12 22:23:22 +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
Eli Friedman
7983cb1dbe
Minor formatting tweak.
...
llvm-svn: 73251
2009-06-12 20:11:05 +00:00
Eli Friedman
0f7d4455fe
Fix a minor formatting mistake.
...
llvm-svn: 73250
2009-06-12 20:08:48 +00:00
Eli Friedman
4e20479de8
Some updates to the gcc extension sections of the users manual.
...
llvm-svn: 73249
2009-06-12 20:04:25 +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
Douglas Gregor
dc41eb18e9
Update the C++ status to reflect improvements in template argument deduction and the handling of class template partial specializations
...
llvm-svn: 73242
2009-06-12 19:15:38 +00:00
Anders Carlsson
b0e8e228ff
Fix PR4365.
...
llvm-svn: 73240
2009-06-12 18:53:02 +00:00
Douglas Gregor
181aa4a250
Improve template argument deduction to keep track of why template
...
argument deduction failed. For example, given
template<typename T> struct is_same<T, T> { ... };
template argument deduction will fail for is_same<int, float>, and now
reports enough information
Right now, we don't do anything with this extra information, but it
can be used for informative diagnostics that say, e.g., "template
argument deduction failed because T was deduced to 'int' in one
context and 'float' in another".
llvm-svn: 73237
2009-06-12 18:26:56 +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
Zhongxing Xu
2693c504c2
use getAsPointerType() method.
...
llvm-svn: 73218
2009-06-12 03:59:12 +00:00
Oscar Fuentes
6c0c09dcbb
CMake: New variable LLVM_LIBDIR_SUFFIX.
...
Patch by Ingmar Vanhassel!
llvm-svn: 73217
2009-06-12 02:54:12 +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
Eli Friedman
7433a248e3
PR4371: Reduce the inlining threshold outside of -O3. This makes
...
the clang inlining threshold consistent with the threshold for llvm-gcc.
llvm-svn: 73204
2009-06-11 20:33:41 +00:00
Eli Friedman
9d79bdaaad
Following gcc, hide the hack to include the SSE2 intrinsics from
...
xmmintrin.h in an ifdef.
llvm-svn: 73200
2009-06-11 18:50:02 +00:00
Ted Kremenek
ea675cf6a3
Add summary lookup for IOServiceGetMatchingService.
...
Convert tabs to spaces.
llvm-svn: 73198
2009-06-11 18:17:24 +00:00
Ted Kremenek
a74ead4103
Refactor some function name -> summary lookup using a switch statement.
...
llvm-svn: 73197
2009-06-11 18:10:48 +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
Douglas Gregor
873495ad98
Point to the clang driver, not the ccc driver
...
llvm-svn: 73192
2009-06-11 14:59:18 +00:00
Douglas Gregor
f0ca0a684d
Add pseudo-destructors to the Open Projects list
...
llvm-svn: 73191
2009-06-11 14:55:39 +00:00
Douglas Gregor
3afbdbd8b4
Prune some projects that have already been started
...
llvm-svn: 73190
2009-06-11 14:53:37 +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
Zhongxing Xu
d85a991253
Use more robust getAsRecordType() method.
...
llvm-svn: 73186
2009-06-11 07:27:30 +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
c43620dedf
Separate TemplateArgument instantiation logic into its own function. No functionality change.
...
llvm-svn: 73176
2009-06-11 00:06:24 +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
f479984762
PR4350: Make sure we don't create invalid printf attributes. This isn't
...
visible anywhere normally because the printf format checks for
this case, and we don't print out attribute values anywhere. Original
patch by Roberto Bagnara.
llvm-svn: 73157
2009-06-10 04:01:38 +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
Ted Kremenek
e6d3ae9d99
Add redirects to new static analysis web site.
...
llvm-svn: 73120
2009-06-09 02:17:37 +00:00
Ted Kremenek
0da03ed2ae
Update static analyzer link to new website.
...
llvm-svn: 73119
2009-06-09 01:37:34 +00:00