Richard Smith
b66d77793f
When defining a forward-declared enum, don't try to attach the definition to
...
a previous declaration if the redeclaration is invalid. That way lies madness.
Fixes a crash-on-invalid reported by Abramo.
llvm-svn: 153349
2012-03-23 23:09:08 +00:00
Richard Smith
4b38ded66a
Instantiating a class template should not instantiate the definition of any
...
scoped enumeration members. Later uses of an enumeration temploid as a nested
name specifier should cause its instantiation. Plus some groundwork for
explicit specialization of member enumerations of class templates.
llvm-svn: 152750
2012-03-14 23:13:10 +00:00
Richard Smith
6d244d754b
cxx_status: No compiler changes are required for 'minimal support for garbage
...
collection'. Keep it in the table to match gcc's table, but mark it N/A.
llvm-svn: 152528
2012-03-11 03:06:00 +00:00
Richard Smith
2a70e65436
Improve diagnostics for UCNs referring to control characters and members of the
...
basic source character set in C++98. Add -Wc++98-compat diagnostics for same in
literals in C++11. Extend such support to cover string literals as well as
character literals, and mark N2170 as done.
This seems too minor to warrant a release note to me. Let me know if you disagree.
llvm-svn: 152444
2012-03-09 22:27:51 +00:00
Richard Smith
5023188315
User-defined literals are done.
...
llvm-svn: 152396
2012-03-09 08:41:27 +00:00
Richard Smith
522fa53703
Add a pile of tests for unrestricted unions, and advertise support for them.
...
llvm-svn: 151992
2012-03-03 23:51:05 +00:00
Sebastian Redl
d89c218a2b
Initializer lists are now supported.
...
llvm-svn: 151458
2012-02-25 20:51:27 +00:00
Richard Smith
18743deb21
cxx_status: Consistently refer to C++11 as "C++11", not as "C++'11" nor as
...
"C++0x". Use "C++98" to refer to C++98, not "C++". Add heading for C++98
support section.
llvm-svn: 151381
2012-02-24 18:42:08 +00:00
Richard Smith
4e8376279d
cxx_status: extended sizeof has been essentially complete for some time. As
...
agreed on IRC, any remaining issues are best dealt with as bugs.
We have no __has_feature check for this; please shout if you'd like one. This
feature seems too small to be worth its own release notes bullet (again, please
shout if you disagree).
llvm-svn: 151380
2012-02-24 18:37:14 +00:00
Douglas Gregor
a2bd11f2de
Tweak C++ status table:
...
- Apparently, SVN is yellow
- Note that initializer lists are "in progress"
llvm-svn: 151232
2012-02-23 03:10:24 +00:00
Douglas Gregor
34b2e8bb17
Clang now supports lambda expressions.
...
llvm-svn: 151231
2012-02-23 03:02:32 +00:00
Richard Smith
b9a7efd791
I hereby declare that all remaining constexpr issues are bugs, not unimplemented
...
features. :)
llvm-svn: 150522
2012-02-14 22:39:23 +00:00
Richard Smith
173b94c9ac
Revert accidentally-committed file in r148020.
...
llvm-svn: 148021
2012-01-12 06:10:09 +00:00
Richard Smith
02ab9c2940
Allow constant-folding of references which were formed in a manner not permitted
...
in a constant expression, for compatibility with g++.
llvm-svn: 148020
2012-01-12 06:08:57 +00:00
Benjamin Kramer
1c9e158120
Fix markup weirdness.
...
llvm-svn: 143803
2011-11-05 10:11:36 +00:00
David Blaikie
503616199f
Fixing some dead links. Patch by Jean-Daniel Dupas!
...
llvm-svn: 143539
2011-11-02 15:13:40 +00:00
Michael J. Spencer
e73bd64d12
Add colors to the C++11 status page.
...
llvm-svn: 143535
2011-11-02 06:29:37 +00:00
Douglas Gregor
7ff1e7ed68
Deleted functions were in Clang 2.9, defaulted functions in
...
3.0. Fixses PR11252.
llvm-svn: 143216
2011-10-28 19:44:09 +00:00
Douglas Gregor
3d711633a3
Tweak the C++11 status prose a bit. We still need better user guidance on the standard library issue
...
llvm-svn: 142019
2011-10-14 23:35:48 +00:00
Douglas Gregor
1f64b59872
Switch the C++11 status table from a developer-centric list to a
...
user-centric list, with Clang version numbers, following GCC's lead
(and user requests).
llvm-svn: 142015
2011-10-14 23:21:49 +00:00
David Blaikie
e35b3aae52
Updating the Clang website to refer to C++'11 instead of C++'0x
...
llvm-svn: 141949
2011-10-14 07:58:10 +00:00
Sebastian Redl
6ce53ae752
Now that we support move generation, mention this in the language extension and C++ status pages. Also update the C++ status for default functions, which are complete now that we can generate move functions, and destructor exception specifications, which I did a while ago.
...
llvm-svn: 141558
2011-10-10 18:10:00 +00:00
Craig Topper
93b3e848de
Update C++0x status page to reflect support for raw string literals.
...
llvm-svn: 137299
2011-08-11 04:09:26 +00:00
Douglas Gregor
9bcdc82642
Update C++0x status page to reflect support for unicode string and character literals, from Craig Topper
...
llvm-svn: 136216
2011-07-27 15:10:09 +00:00
Douglas Gregor
918f98ab42
Update C++0x status for explicit override controls and explicit
...
conversion operators, from Jonathan Sauer.
llvm-svn: 135932
2011-07-25 18:53:48 +00:00
Richard Smith
42a4996b5a
Update cxx_status page on www: clang has had full support for in-class initializers since r132890.
...
llvm-svn: 135689
2011-07-21 18:02:57 +00:00
Douglas Gregor
17aa45d431
Clean up the C++ status page by eliminating the utterly unnecessary set of projects. C++98/03 is sooooo yesterday
...
llvm-svn: 135687
2011-07-21 17:46:15 +00:00
Douglas Gregor
80d6322c00
Update C++0x nullptr status, from Jonathan Sauer
...
llvm-svn: 135686
2011-07-21 17:41:00 +00:00
Richard Smith
e3a5ff1508
Update www: we now mangle references to function parameters properly. Also, this is really more a decltype issue rather than a late-specified return type issue.
...
llvm-svn: 130958
2011-05-05 22:07:51 +00:00
Richard Smith
3f1b5d077b
Implement support for C++0x alias templates.
...
llvm-svn: 130953
2011-05-05 21:57:07 +00:00
Alexis Hunt
61bc173784
Fully implement delegating constructors!
...
As far as I know, this implementation is complete but might be missing a
few optimizations. Exceptions and virtual bases are handled correctly.
Because I'm an optimist, the web page has appropriately been updated. If
I'm wrong, feel free to downgrade its support categories.
llvm-svn: 130642
2011-05-01 07:04:31 +00:00
Richard Smith
6c42433ceb
Update www: clang now supports C++11 for-range and non-template type aliases.
...
llvm-svn: 129569
2011-04-15 14:38:27 +00:00
Chris Lattner
57540c5be0
fix a bunch of comment typos found by codespell. Patch by
...
Luis Felipe Strano Moraes!
llvm-svn: 129559
2011-04-15 05:22:18 +00:00
Richard Smith
fdc33cbecd
Name mangling of late-specified return types doesn't work if the return type references the argument types:
...
template<typename T> auto f(T a) -> decltype(a.foo());
Since this is the primary reason for the introduction of this feature, downgrade implementation status to "Some examples work".
llvm-svn: 129533
2011-04-14 19:57:19 +00:00
Richard Smith
13f68cf53e
clang has had full and tested support for C++0x trailing-return-type and auto type deduction since r126166. Update the website to reflect this, and add a __has_feature test.
...
trailing-return-type codegen is not tested yet (name mangling in particular).
llvm-svn: 128787
2011-04-03 14:12:46 +00:00
Jeffrey Yasskin
cb40757195
Add a libstdc++-4.4 patch for C++0x to the website.
...
llvm-svn: 128498
2011-03-29 22:27:50 +00:00
Douglas Gregor
0a1650feae
Clang supports __STDC_HOSTED__. Patch by Jonathan Sauer
...
llvm-svn: 128377
2011-03-27 09:49:38 +00:00
Richard Smith
bb7dcf59a0
Update the www to indicate that auto is now implemented.
...
llvm-svn: 126280
2011-02-23 00:41:16 +00:00
Douglas Gregor
9636753d39
Update C++0x status web page
...
llvm-svn: 124326
2011-01-26 21:35:14 +00:00
Douglas Gregor
eecc6bc388
Variadic templates are fully implemented.
...
Turn on the __has_feature switch for variadic templates, document
their completion, and put the ExtWarn into the c++0x-extensions
warning group.
llvm-svn: 123854
2011-01-19 22:11:50 +00:00
Douglas Gregor
cf082adeca
Add back the late-specified return type paper
...
llvm-svn: 122317
2010-12-21 05:54:22 +00:00
Douglas Gregor
6b6e08228c
Updates to the C++ status page for C++0x features, from Michael Price
...
llvm-svn: 122315
2010-12-21 05:43:31 +00:00
Chris Lattner
a45ebd2fd1
be less threatening.
...
llvm-svn: 116187
2010-10-11 05:20:49 +00:00
Douglas Gregor
21fd023d44
Update C++0x status
...
llvm-svn: 114217
2010-09-17 21:37:49 +00:00
Gabor Greif
e4d36a2415
mark boost's tracking bug as fixed
...
llvm-svn: 112183
2010-08-26 14:20:18 +00:00
Chris Lattner
b9ea2c29a1
down with export.
...
llvm-svn: 104383
2010-05-21 21:16:21 +00:00
Chris Lattner
da9e3287f9
another unneeded line.
...
llvm-svn: 104379
2010-05-21 21:02:17 +00:00
Chris Lattner
6fe3748de4
major update to the C++ status page. C++ support is
...
now done and no more patches to it will be accepted.
llvm-svn: 104378
2010-05-21 20:59:40 +00:00
Douglas Gregor
61c1ac2e5c
Remove the blanket statement about Clang not supporting access control. It does now
...
llvm-svn: 101041
2010-04-12 16:01:38 +00:00
Anton Korobeynikov
c5c905e772
Fix typo
...
llvm-svn: 95664
2010-02-09 16:50:54 +00:00
Anton Korobeynikov
55496d736b
Clearify Qt status a bit
...
llvm-svn: 95663
2010-02-09 16:46:25 +00:00
Douglas Gregor
fa186e9e19
Add Qt, CMake projects to the list of C++ projects we're working on compiling
...
llvm-svn: 95662
2010-02-09 16:36:17 +00:00
Douglas Gregor
bb26a92239
Update Clang C++ status, with a more project-centric focus.
...
llvm-svn: 95455
2010-02-05 23:51:14 +00:00
Chris Lattner
f0b0cb2dcb
comments shouldn't go in the AST, and we already make it easy
...
to go from a decl to the doc comments for it.
llvm-svn: 91785
2009-12-19 20:59:13 +00:00
Douglas Gregor
4044489d69
Update C++ status page to reflect reality
...
llvm-svn: 91541
2009-12-16 16:23:48 +00:00
Douglas Gregor
09177b2b7f
Update C++ status
...
llvm-svn: 89492
2009-11-20 22:00:06 +00:00
Benjamin Kramer
53ba5f21ff
Doug says this is medium done.
...
llvm-svn: 85592
2009-10-30 14:54:38 +00:00
Benjamin Kramer
c1dea5dded
cxx_status: fix some missing/wrong cells.
...
llvm-svn: 85591
2009-10-30 14:41:58 +00:00
Fariborz Jahanian
370606afee
Restored note on pointer to members with a pointer
...
to issue involved.
llvm-svn: 85409
2009-10-28 18:06:53 +00:00
Fariborz Jahanian
7e4e44f5fa
Removed a Note related to pointer to member functions which
...
does not seem to exist any longer.
llvm-svn: 85405
2009-10-28 17:25:01 +00:00
Douglas Gregor
19f3d70149
Test
...
explicit-instantiation-declaration-after-explicit-instantiation-definition
errors. This wraps up explicit template instantiation for now.
llvm-svn: 85347
2009-10-27 23:55:05 +00:00
Fariborz Jahanian
9559ced10b
Updated, we support == and != builtins for member pointers.
...
llvm-svn: 84679
2009-10-20 21:10:15 +00:00
Fariborz Jahanian
00c6d13dce
Changes to reflect more pointer-to-member support.
...
llvm-svn: 84670
2009-10-20 20:31:50 +00:00
Douglas Gregor
054060c4ec
Give ourselves an A- on ASTs for explicit specializations, since they
...
aren't rich enough to reproduce the source accurately.
llvm-svn: 84012
2009-10-13 19:41:44 +00:00
Douglas Gregor
62e10f0bdc
Diagnose attempts to add default function arguments to a
...
specialization. This completes C++ [temp.expl.spec]!
llvm-svn: 83980
2009-10-13 17:02:54 +00:00
Sebastian Redl
8046049942
This ought to complete exception spec support. Man, am I glad.
...
llvm-svn: 83767
2009-10-11 09:14:57 +00:00
Douglas Gregor
1245e6ff69
Tests for C++ [expr], from James Porter!
...
llvm-svn: 83588
2009-10-08 22:38:14 +00:00
Benjamin Kramer
d8e06611eb
Fix typo.
...
llvm-svn: 83246
2009-10-02 12:19:16 +00:00
Douglas Gregor
49663d2a23
Update C++ status page
...
llvm-svn: 83157
2009-09-30 18:32:57 +00:00
Fariborz Jahanian
774cf79987
Patch for AST representation for the implicit conversion to a function
...
reference/pointer. And a test case for code gen.
llvm-svn: 83000
2009-09-28 18:35:46 +00:00
Fariborz Jahanian
44dfbbb69f
Update for inherited conversion function support.
...
llvm-svn: 81865
2009-09-15 16:15:23 +00:00
Fariborz Jahanian
3df0459149
Status update related to code gen for type conversion
...
functions.
llvm-svn: 81373
2009-09-09 20:00:07 +00:00
Douglas Gregor
d94105a1c2
Don't generate any code for an explicit call to a trivial destructor.
...
Now that parsing, semantic analysis, and (I think) code generation of
pseudo-destructor expressions and explicit destructor calls works,
update the example-dynarray.cpp test to destroy the objects it
allocates and update the test to actually compile + link.
The code seems correct, but the Clang-compiled version dies with a
malloc error. Time to debug!
llvm-svn: 81025
2009-09-04 19:04:08 +00:00
Douglas Gregor
7a0f1105ce
Update C++ status, since a bunch of the comments were out-of-date
...
llvm-svn: 80954
2009-09-03 21:51:43 +00:00
Douglas Gregor
2b6ca46c6b
Improve template instantiation for member access expressions that
...
involve qualified names, e.g., x->Base::f. We now maintain enough
information in the AST to compare the results of the name lookup of
"Base" in the scope of the postfix-expression (determined at template
definition time) and in the type of the object expression.
llvm-svn: 80953
2009-09-03 21:38:09 +00:00
Douglas Gregor
b00b10eb2e
Implement support for equality comparisons (!=, ==) of member
...
pointers, by extending the "composite pointer type" logic to include
member pointer types.
Introduce test cases for member pointer comparisons, including those
that involve the builtin operator candidates implemented earlier.
llvm-svn: 79925
2009-08-24 17:42:35 +00:00
Fariborz Jahanian
8ba39c04ae
Updated statuc page to reflect recent implementations
...
of section 12 [special member functions]
llvm-svn: 79704
2009-08-22 00:18:52 +00:00
Douglas Gregor
1d08135537
Update Clang C++ status to better reflect what is implemented.
...
llvm-svn: 79695
2009-08-21 23:27:46 +00:00
Douglas Gregor
05155d8d7b
Implement conversion function templates, along with the ability to use
...
template argument deduction from a conversion function (C++
[temp.deduct.conv]) with implicit conversions.
llvm-svn: 79693
2009-08-21 23:19:43 +00:00
Douglas Gregor
cc17ac0cf2
We have fairly good support for namespaces, now. Namespace aliases are parsed correctly
...
llvm-svn: 77900
2009-08-02 18:22:38 +00:00
Sebastian Redl
9f831dbbcd
Implement C++ semantics for C-style and functional-style casts. This regresses Clang extension conversions, like vectors, but allows conversions via constructors and conversion operators.
...
Add custom conversions to static_cast.
llvm-svn: 77076
2009-07-25 15:41:38 +00:00
Douglas Gregor
c04e2d9bd6
We now do complete semantic checking for unions
...
llvm-svn: 76918
2009-07-24 00:05:42 +00:00
Douglas Gregor
020e4a9bbb
Update C++ status to reflect progress on out-of-line definitions of class template members
...
llvm-svn: 76917
2009-07-23 23:58:15 +00:00
Douglas Gregor
b257e4fff8
Implement the simple form of overload resolution used when taking the
...
address of an overloaded function (which may involve both functions
and function templates).
llvm-svn: 75069
2009-07-08 23:33:52 +00:00
Douglas Gregor
ed3c80eb75
Update the C++ status table to better reflect our support for function overloading
...
llvm-svn: 74997
2009-07-08 10:03:09 +00:00
Douglas Gregor
197e5f7bb7
Improve argument-dependent lookup to find associated classes and
...
namespaces based on the template arguments of a class template
specialization type.
llvm-svn: 74993
2009-07-08 07:51:57 +00:00
Douglas Gregor
9fc6097145
Template argument deduction from a call has improved a bit
...
llvm-svn: 74966
2009-07-07 23:12:18 +00:00
Douglas Gregor
0799d916e1
Add a Last Updated field to the C++ status page
...
llvm-svn: 74387
2009-06-27 19:33:58 +00:00
Douglas Gregor
1e880602ad
Make a note of improvements to function templates
...
llvm-svn: 74360
2009-06-27 00:08:54 +00:00
Anders Carlsson
b7fe2d672a
We now support decltype (as far as I know :)
...
llvm-svn: 74127
2009-06-24 22:10:19 +00:00
Anders Carlsson
b50f45f9b2
Nested classes are now complete.
...
llvm-svn: 74052
2009-06-24 02:03:09 +00:00
Anders Carlsson
58b19d5310
class.nested.type is done.
...
llvm-svn: 74034
2009-06-24 00:32:04 +00:00
Douglas Gregor
ac1798a859
Note that we've implemented the right angle brackets extension in C++0x
...
llvm-svn: 73389
2009-06-15 16:50:45 +00:00
Douglas Gregor
33834516f3
Update LLVM.
...
Implement support for C++ Substitution Failure Is Not An Error
(SFINAE), which says that errors that occur during template argument
deduction do *not* produce diagnostics and do not necessarily make a
program ill-formed. Instead, template argument deduction silently
fails. This is currently implemented for template argument deduction
during matching of class template partial specializations, although
the mechanism will also apply to template argument deduction for
function templates. The scheme is simple:
- If we are in a template argument deduction context, any diagnostic
that is considered a SFINAE error (or warning) will be
suppressed. The error will be propagated up the call stack via the
normal means.
- By default, all warnings and errors are SFINAE errors. Add the
NoSFINAE class to a diagnostic in the .td file to make it a hard
error (e.g., for access-control violations).
Note that, to make this fully work, every place in Sema that emits an
error *and then immediately recovers* will need to check
Sema::isSFINAEContext() to determine whether it must immediately
return an error rather than recovering.
llvm-svn: 73332
2009-06-14 07:33:30 +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
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
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
Douglas Gregor
a1f4997368
Semantic analysis for explicit instantiation of class templates. We
...
still aren't instantiating the definitions of class template members,
and core issues 275 and 259 will both affect the checking that we do
for explicit instantiations (but are not yet implemented).
llvm-svn: 71613
2009-05-13 00:25:59 +00:00
Douglas Gregor
1b57ff32a8
Implement parsing for explicit instantiations of class templates, e.g.,
...
template class X<int>;
This also cleans up the propagation of template information through
declaration parsing, which is used to improve some diagnostics.
llvm-svn: 71608
2009-05-12 23:25:50 +00:00
Douglas Gregor
9e0d21a444
Align the N/A in the C++ status table, from Anders Johnsen
...
llvm-svn: 71576
2009-05-12 18:36:58 +00:00
Douglas Gregor
5a4d12afbf
Fill in more C++ status. We're now using the check mark to mean,
...
"complete, and we have tests for every paragraph".
llvm-svn: 71564
2009-05-12 17:55:28 +00:00
Sebastian Redl
9257b234a5
Update minor points in C++ status table.
...
llvm-svn: 71406
2009-05-10 20:06:11 +00:00
Sebastian Redl
576fd424df
Implement C++0x nullptr.
...
llvm-svn: 71405
2009-05-10 18:38:11 +00:00
Douglas Gregor
1bbffbceae
Big update to the C++ status table to reflect "recent"
...
development. Still much more to write!
llvm-svn: 71167
2009-05-07 17:50:16 +00:00
Sebastian Redl
2b9cacbffa
Have the parser communicate the exception specification to the action.
...
llvm-svn: 70389
2009-04-29 17:30:04 +00:00
Sebastian Redl
4c018663b2
Track down return statements in the handlers of a function-try-block of constructors. Meh ...
...
llvm-svn: 70256
2009-04-27 21:33:24 +00:00
Sebastian Redl
4de47b445b
Improve validation of C++ exception handling: diagnose throwing incomplete types and jumps into protected try-catch scopes.
...
llvm-svn: 70242
2009-04-27 20:27:31 +00:00
Sebastian Redl
21b349d5ea
Fill in the C++ status table for exceptions
...
llvm-svn: 70217
2009-04-27 18:25:15 +00:00
Sebastian Redl
8ce189f9ce
Conditional operator C++ checking complete. What issues remain are in more general code.
...
llvm-svn: 69555
2009-04-19 21:53:20 +00:00
Sebastian Redl
d1309a3c4d
Add deleted functions and rvalue references to C++ status.
...
llvm-svn: 68903
2009-04-12 17:41:24 +00:00
Anders Carlsson
452e1c8a6a
We fully support namespace aliases now.
...
llvm-svn: 68116
2009-03-31 17:17:14 +00:00
Anders Carlsson
b6da73f2e0
class.abstract is complete. Anything that doesn't work is a bug.
...
llvm-svn: 67595
2009-03-24 01:24:06 +00:00
Douglas Gregor
2460c0c37c
Link from the C++ status page to the open projects page
...
llvm-svn: 67399
2009-03-20 20:39:57 +00:00
Anders Carlsson
bd1a1d2fa6
We support static_assert.
...
llvm-svn: 67043
2009-03-16 17:28:26 +00:00
Douglas Gregor
83e9e91479
Note some advances in our C++ support
...
llvm-svn: 66742
2009-03-12 00:09:31 +00:00
Gabor Greif
dd4ddf13a6
fix (hopefully) some validation errors
...
llvm-svn: 65455
2009-02-25 15:22:45 +00:00
Cedric Venet
08438133da
Add svn:eol-style=native to some files
...
Correct two files with inconsistent lines endings.
llvm-svn: 64564
2009-02-14 20:20:19 +00:00
Sebastian Redl
f3b5e27fee
Make const-initialized const integral variables I-C-Es in C++.
...
llvm-svn: 64015
2009-02-07 13:06:23 +00:00
Sebastian Redl
779dd9382d
Fill in C++ status table for section 7 (declarations).
...
llvm-svn: 64013
2009-02-07 12:42:13 +00:00
Sebastian Redl
112a976616
Implement dereferencing of pointers-to-member.
...
llvm-svn: 63983
2009-02-07 00:15:38 +00:00
Sebastian Redl
18f8ff62a3
Implement taking address of member functions, including overloaded ones.
...
llvm-svn: 63779
2009-02-04 21:23:32 +00:00
Douglas Gregor
7bad6d1d32
Argument Dependent Lookup is done (for now). Also, update the status
...
for a few other name-lookup sections.
llvm-svn: 63734
2009-02-04 15:07:16 +00:00
Douglas Gregor
d14247a9e5
Implement and test aggregate initialization in C++. Major changes:
...
- Support initialization of reference members; complain if any
reference members are left uninitialized.
- Use C++ copy-initialization for initializing each element (falls
back to constraint checking in C)
- Make sure we diagnose when one tries to provide an initializer
list for a non-aggregate.
- Don't complain about empty initializers in C++ (they are permitted)
- Unrelated but necessary: don't bother trying to convert the
decl-specifier-seq to a type when we're dealing with a C++
constructor, destructor, or conversion operator; it results in
spurious warnings.
llvm-svn: 63431
2009-01-30 22:09:00 +00:00
Sebastian Redl
ed8f200318
Implement pointer to member handling in static_cast.
...
Fix a stupid mistake in UnwrapSimilarPointers that made any two member pointers compatible as long as the pointee was the same.
Make a few style corrections as suggested by Chris.
llvm-svn: 63215
2009-01-28 18:33:18 +00:00
Douglas Gregor
fb03466388
Complete semantic checking for typedef redeclarations in C++. The
...
rules are slightly different than in C, and now we handle both
dialects properly.
llvm-svn: 63211
2009-01-28 17:15:10 +00:00
Sebastian Redl
a5a77a6dc6
Add handling of member pointers to reinterpret_cast.
...
llvm-svn: 63150
2009-01-27 23:18:31 +00:00
Sebastian Redl
b44ab5f25d
Add support for member pointers to const_cast.
...
llvm-svn: 63055
2009-01-26 22:19:12 +00:00
Sebastian Redl
cf8e1fa58e
Update C++ status table with new member pointer conversion capabilities.
...
llvm-svn: 62977
2009-01-26 00:11:25 +00:00
Douglas Gregor
5fb5397238
Introduce support for C++0x explicit conversion operators (N2437)
...
Small cleanup in the handling of user-defined conversions.
Also, implement an optimization when constructing a call. We avoid
recomputing implicit conversion sequences and instead use those
conversion sequences that we computed as part of overload resolution.
llvm-svn: 62231
2009-01-14 15:45:31 +00:00
Douglas Gregor
c5e61070f6
Add the proper restrictions on the left-hand argument of a built-in
...
assignment operator candidate (C++ [over.match.oper]p4).
llvm-svn: 62128
2009-01-13 00:52:54 +00:00
Douglas Gregor
ae5e28578c
Update C++ status and add a few more tests of overloading for member function calls
...
llvm-svn: 62121
2009-01-12 23:20:38 +00:00
Douglas Gregor
f4d332797b
Finished semantic analysis of anonymous unions in C++.
...
Duplicate-member checking within classes is still a little messy, and
anonymous unions are still completely broken in C. We'll need to unify
the handling of fields in C and C++ to make this code applicable in
both languages.
llvm-svn: 61878
2009-01-07 19:46:03 +00:00
Douglas Gregor
d7c4d984d0
Parser support for C++ using directives, from Piotr Rak
...
llvm-svn: 61486
2008-12-30 03:27:21 +00:00
Sebastian Redl
58097c79c2
Fill in C++ status table for statements.
...
llvm-svn: 61457
2008-12-28 17:18:13 +00:00
Sebastian Redl
e10c2c32af
Implement checks for bool in increment and decrement.
...
llvm-svn: 61275
2008-12-20 09:35:34 +00:00
Douglas Gregor
dd12c786a0
Added a test for default arguments added to out-of-line member
...
functions. They work except that name lookup within the default
arguments needs to be deferred until the class definition is complete
(see FIXME in the test).
llvm-svn: 61059
2008-12-16 00:08:34 +00:00
Sebastian Redl
e0c2affc5e
Fill in C++ status table for expressions.
...
llvm-svn: 60763
2008-12-09 14:40:01 +00:00
Sebastian Redl
82639aff7b
Fill in some parts of cxx_status.html
...
llvm-svn: 60699
2008-12-08 16:24:08 +00:00
Sebastian Redl
5c6ebcc198
Parsing new and delete is now complete.
...
llvm-svn: 60425
2008-12-02 17:22:40 +00:00
Sebastian Redl
351bb78a10
Handle new by passing the Declaration to the Action, not a processed type.
...
llvm-svn: 60413
2008-12-02 14:43:59 +00:00
Douglas Gregor
8e3e16ed2e
Update C++ status
...
llvm-svn: 59735
2008-11-20 16:46:32 +00:00
Douglas Gregor
ab7897ac44
Implement the rest of C++ [over.call.object], which permits the object
...
being called to be converted to a reference-to-function,
pointer-to-function, or reference-to-pointer-to-function. This is done
through "surrogate" candidate functions that model the conversions
from the object to the function (reference/pointer) and the
conversions in the arguments.
llvm-svn: 59674
2008-11-19 22:57:39 +00:00
Douglas Gregor
91cea0ad1e
Support for calling overloaded function call operators (operator())
...
with function call syntax, e.g.,
Functor f;
f(x, y);
This is the easy part of handling calls to objects of class type
(C++ [over.call.object]). The hard part (coping with conversions from
f to function pointer or reference types) will come later. Nobody uses
that stuff anyway, right? :)
llvm-svn: 59663
2008-11-19 21:05:33 +00:00
Douglas Gregor
40412acc02
Support overloading of the subscript operator[], including support for
...
built-in operator candidates. Test overloading of '&' and ','.
In C++, a comma expression is an lvalue if its right-hand
subexpression is an lvalue. Update Expr::isLvalue accordingly.
llvm-svn: 59643
2008-11-19 17:17:41 +00:00
Douglas Gregor
d08452f60a
Added operator overloading for unary operators, post-increment, and
...
post-decrement, including support for generating all of the built-in
operator candidates for these operators.
C++ and C have different rules for the arguments to the builtin unary
'+' and '-'. Implemented both variants in Sema::ActOnUnaryOp.
In C++, pre-increment and pre-decrement return lvalues. Update
Expr::isLvalue accordingly.
llvm-svn: 59638
2008-11-19 15:42:04 +00:00
Sebastian Redl
ccdfabab35
Implement parsing and semantic checking of the 'mutable' keyword.
...
Thanks to Doug for the review. Actual effects of mutable to follow.
llvm-svn: 59331
2008-11-14 23:42:31 +00:00
Sebastian Redl
c470476420
Implement C++ 'typeid' parsing and sema.
...
llvm-svn: 59042
2008-11-11 11:37:55 +00:00
Douglas Gregor
cd695e500d
Basic support for taking the address of an overloaded function
...
llvm-svn: 59000
2008-11-10 20:40:00 +00:00
Sebastian Redl
e0b2b1bf8c
Update C++ status: class support improved due to nested name parsing.
...
llvm-svn: 58932
2008-11-09 11:32:32 +00:00