Commit Graph

116 Commits

Author SHA1 Message Date
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