diff options
author | fche <fche> | 2005-03-03 21:24:24 +0000 |
---|---|---|
committer | fche <fche> | 2005-03-03 21:24:24 +0000 |
commit | 0054a7eaacba2a7183be67b28e7746ed55a8f6d1 (patch) | |
tree | ed5c0db8a2cd3bb85fd9bd24232fe01ef6576a68 /staptree.h | |
parent | 56099f083d7a68722ace316be4d288d21caabaee (diff) | |
download | systemtap-steved-0054a7eaacba2a7183be67b28e7746ed55a8f6d1.tar.gz systemtap-steved-0054a7eaacba2a7183be67b28e7746ed55a8f6d1.tar.xz systemtap-steved-0054a7eaacba2a7183be67b28e7746ed55a8f6d1.zip |
2005-03-03 Frank Ch. Eigler <fche@redhat.com>
* parse.cxx (parse_assignment): Assert lvalueness of left
operand.
* staptree.h (expression): Add is_lvalue member.
* staptree.cxx (functioncall::resolve_types): Don't crash on
formal-vs-actual argument count mismatch.
(*): Add some is_lvalue stub functions.
* testsuite/*: Some new tests.
Diffstat (limited to 'staptree.h')
-rw-r--r-- | staptree.h | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -32,6 +32,7 @@ struct expression virtual ~expression (); virtual void resolve_symbols (symresolution_info& r) = 0; virtual void resolve_types (typeresolution_info& r, exp_type t) = 0; + virtual bool is_lvalue () = 0; }; ostream& operator << (ostream& o, expression& k); @@ -41,6 +42,7 @@ struct literal: public expression { void resolve_symbols (symresolution_info& r); void resolve_types (typeresolution_info& r, exp_type t); + bool is_lvalue () { return false; } }; @@ -68,6 +70,7 @@ struct binary_expression: public expression void print (ostream& o); void resolve_symbols (symresolution_info& r); void resolve_types (typeresolution_info& r, exp_type t); + bool is_lvalue () { return false; } }; @@ -78,16 +81,19 @@ struct unary_expression: public expression void print (ostream& o); void resolve_symbols (symresolution_info& r); void resolve_types (typeresolution_info& r, exp_type t); + bool is_lvalue () { return false; } }; struct pre_crement: public unary_expression { + bool is_lvalue (); }; struct post_crement: public unary_expression { + bool is_lvalue (); void print (ostream& o); }; @@ -130,11 +136,13 @@ struct ternary_expression: public expression void print (ostream& o); void resolve_symbols (symresolution_info& r); void resolve_types (typeresolution_info& r, exp_type t); + bool is_lvalue () { return false; } }; struct assignment: public binary_expression { + bool is_lvalue (); }; @@ -147,6 +155,7 @@ struct symbol: public expression void print (ostream& o); void resolve_symbols (symresolution_info& r); void resolve_types (typeresolution_info& r, exp_type t); + bool is_lvalue () { return true; } }; @@ -159,10 +168,10 @@ struct arrayindex: public expression void print (ostream& o); void resolve_symbols (symresolution_info& r); void resolve_types (typeresolution_info& r, exp_type t); + bool is_lvalue () { return true; } }; - class functiondecl; struct functioncall: public expression { @@ -173,6 +182,7 @@ struct functioncall: public expression void print (ostream& o); void resolve_symbols (symresolution_info& r); void resolve_types (typeresolution_info& r, exp_type t); + bool is_lvalue () { return false; } }; |