Commit Graph

277 Commits

Author SHA1 Message Date
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
Ted Kremenek 29704928b7 Updated checker build.
llvm-svn: 59591
2008-11-19 05:46:43 +00:00
Daniel Dunbar bf45c9a4e4 Add some quick notes on the clang tests and running the LLVM test
suite with clang.

llvm-svn: 59536
2008-11-18 17:56:21 +00:00
Ted Kremenek ee4fa9cfbb Updated checker build.
llvm-svn: 59503
2008-11-18 07:27:02 +00:00
Ted Kremenek f9f58f085d Updated checker build.
llvm-svn: 59457
2008-11-17 19:26:13 +00:00
Ted Kremenek 9f748e23e3 Updated checker build.
llvm-svn: 59353
2008-11-15 04:57:19 +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
Daniel Dunbar 62efa23518 Fix some validation errors.
llvm-svn: 59272
2008-11-13 23:01:34 +00:00
Daniel Dunbar ed40bc19c9 Start a "hacking" page with some simple notes on getting started
developing clang.

llvm-svn: 59270
2008-11-13 22:49:41 +00:00
Ted Kremenek 83844100fb Revert to older checker build.
llvm-svn: 59209
2008-11-13 01:30:19 +00:00
Ted Kremenek d0e32791d5 Update checker build.
llvm-svn: 59206
2008-11-13 01:23:50 +00:00
Ted Kremenek e9c16a6a79 Updated checker build.
llvm-svn: 59195
2008-11-12 23:26:57 +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
Sebastian Redl f4485de48a Update C++ status to reflect parser capabilities for chapter 9 (classes). Slightly extend the class parser test.
llvm-svn: 58909
2008-11-08 15:40:37 +00:00
Sebastian Redl 2e133e47aa Update C++ status: dynamic_cast is sema-complete.
llvm-svn: 58907
2008-11-08 14:43:13 +00:00
Cedric Venet 571c662350 Use css style instead of hard coded color in cxx_status. No visible change.
llvm-svn: 58867
2008-11-07 22:24:44 +00:00
Ted Kremenek 47a6235491 Updated checker build.
llvm-svn: 58864
2008-11-07 20:55:59 +00:00
Douglas Gregor 60e64cfc43 Update C++ status
llvm-svn: 58862
2008-11-07 20:16:04 +00:00
Douglas Gregor 7d5fc7e28b Initial, rudimentary implementation of operator overloading for binary
operators. For example, one can now write "x + y" where x or y is a
class or enumeration type, and Clang will perform overload resolution
for "+" based on the overloaded operators it finds.

The other kinds of overloadable operators in C++ will follow this same
approach. 

Three major issues remain:
  1) We don't find member operators
  2) Since we don't have user-defined conversion operators, we can't
  call any of the built-in overloaded operators in C++ [over.built].
  3) Once we've done the semantic checks, we drop the overloaded
  operator on the floor; it doesn't get into the AST at all.

llvm-svn: 58821
2008-11-06 23:29:22 +00:00
Douglas Gregor 11d0c4c098 Parsing, ASTs, and semantic analysis for the declaration of overloaded
operators in C++. Overloaded operators can be called directly via
their operator-function-ids, e.g., "operator+(foo, bar)", but we don't
yet implement the semantics of operator overloading to handle, e.g.,
"foo + bar".

llvm-svn: 58817
2008-11-06 22:13:31 +00:00
Ted Kremenek efc44cbf1f Updated checker build.
llvm-svn: 58776
2008-11-05 22:47:25 +00:00
Douglas Gregor 831c93f6c0 Parsing, representation, and preliminary semantic analysis of destructors.
Implicit declaration of destructors (when necessary).

Extended Declarator to store information about parsed constructors
and destructors; this will be extended to deal with declarators that
name overloaded operators (e.g., "operator +") and user-defined
conversion operators (e.g., "operator int").

llvm-svn: 58767
2008-11-05 20:51:48 +00:00
Douglas Gregor e8381c00eb Initial implementation of parsing, semantic analysis, and AST-building
for constructor initializations, e.g.,

  class A { };
  class B : public A { 
    int m;
  public:
    B() : A(), m(17) { };
  };

llvm-svn: 58749
2008-11-05 04:29:56 +00:00
Daniel Dunbar 40346506f1 Remove stray character.
llvm-svn: 58713
2008-11-04 18:44:31 +00:00
Douglas Gregor 242ee9dfae Fine-grained C++ status page
llvm-svn: 58699
2008-11-04 15:52:45 +00:00
Ted Kremenek 307b2c4078 Updated checker build.
llvm-svn: 58672
2008-11-04 01:24:32 +00:00
Ted Kremenek a3199323fe Updated checker build.
llvm-svn: 58658
2008-11-04 00:03:24 +00:00
Daniel Dunbar 925dc26d51 Clarify performance experiments description based on feedback from
Eric C, thanks!

llvm-svn: 58634
2008-11-03 20:03:58 +00:00
Chris Lattner ce149def9d minor tweaks.
llvm-svn: 58545
2008-11-01 01:46:51 +00:00
Daniel Dunbar 05f13bcc2c Grammar tweaks.
llvm-svn: 58544
2008-11-01 01:24:31 +00:00
Daniel Dunbar 13569f8dd6 Add recent timing results to web page.
llvm-svn: 58542
2008-11-01 01:14:36 +00:00
Ted Kremenek 883af75f01 Updated checker build.
llvm-svn: 58473
2008-10-30 23:41:37 +00:00
Daniel Dunbar def9076430 Fix specification references link.
llvm-svn: 58412
2008-10-30 00:53:12 +00:00
Ted Kremenek f521e4a90b Update checker build.
llvm-svn: 58369
2008-10-29 06:19:03 +00:00
Ted Kremenek 02f9fd4a6c Update checker build.
llvm-svn: 58289
2008-10-27 22:42:11 +00:00
Ted Kremenek bb913f2369 Updated checker build.
llvm-svn: 58125
2008-10-24 22:34:49 +00:00
Daniel Dunbar c157586598 Add ViewVC link from web page.
llvm-svn: 58119
2008-10-24 21:31:50 +00:00
Ted Kremenek dfaeaed0f6 Updated checker build.
llvm-svn: 58027
2008-10-23 02:50:14 +00:00
Ted Kremenek a08a05e541 Updated checker build.
llvm-svn: 58005
2008-10-22 21:53:52 +00:00
Ted Kremenek 7c3a364355 Update server URL for checker build.
llvm-svn: 57981
2008-10-22 15:33:19 +00:00
Ted Kremenek 518b17e8f3 Updated checker build.
llvm-svn: 57931
2008-10-21 21:56:56 +00:00
Ted Kremenek 9667b7c9c0 Updated checker build
llvm-svn: 57890
2008-10-21 04:32:44 +00:00
Ted Kremenek e76edcfc65 Updated checker build
llvm-svn: 57808
2008-10-20 06:58:23 +00:00
Ted Kremenek cfb049c832 Updated checker build
llvm-svn: 57775
2008-10-18 21:03:40 +00:00