summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/CheckStatement.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2010-02-04 16:31:29 +0100
committerErik Verbruggen <erik.verbruggen@nokia.com>2010-02-07 10:49:02 +0100
commit6ca5f5f5f886449f88d1ff7085f640c46bbc8fb2 (patch)
treeddad79f8d3a8111c63df9c6a7400787e8a345d9f /src/shared/cplusplus/CheckStatement.h
parentfd90c3503db076b95f2e97455e9e8fcf9c374a88 (diff)
downloadqt-creator-6ca5f5f5f886449f88d1ff7085f640c46bbc8fb2.tar.gz
Added semantic checks for compound expressions.
Diffstat (limited to 'src/shared/cplusplus/CheckStatement.h')
-rw-r--r--src/shared/cplusplus/CheckStatement.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/shared/cplusplus/CheckStatement.h b/src/shared/cplusplus/CheckStatement.h
index 5c1b1ff02d..dc8447f37e 100644
--- a/src/shared/cplusplus/CheckStatement.h
+++ b/src/shared/cplusplus/CheckStatement.h
@@ -50,9 +50,9 @@
#define CPLUSPLUS_CHECKSTATEMENT_H
#include "CPlusPlusForwardDeclarations.h"
+#include "FullySpecifiedType.h"
#include "SemanticCheck.h"
-
namespace CPlusPlus {
class CPLUSPLUS_EXPORT CheckStatement: public SemanticCheck
@@ -61,9 +61,10 @@ public:
CheckStatement(Semantic *semantic);
virtual ~CheckStatement();
- void check(StatementAST *statement, Scope *scope);
+ FullySpecifiedType check(StatementAST *statement, Scope *scope);
protected:
+ FullySpecifiedType switchExprType(const FullySpecifiedType &type);
StatementAST *switchStatement(StatementAST *statement);
Scope *switchScope(Scope *scope);
@@ -98,9 +99,12 @@ protected:
ExpressionAST *expression,
StatementAST *statement,
Block *&symbol);
+ FullySpecifiedType checkCompoundStmt(CompoundStatementAST *stmt);
+
private:
StatementAST *_statement;
Scope *_scope;
+ FullySpecifiedType _exprType;
};
} // end of namespace CPlusPlus