forked from qt-creator/qt-creator
Added semantic checks for compound expressions.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user