Debian Codegraph @

clang_delta/SimplifyCommaExpr.h

raw symbols SCIP
1 //===----------------------------------------------------------------------===//
2 //
3 // Copyright (c) 2012 The University of Utah
4 // All rights reserved.
5 //
6 // This file is distributed under the University of Illinois Open Source
7 // License. See the file COPYING for details.
8 //
9 //===----------------------------------------------------------------------===//
10
11 #ifndef SIMPLIFY_COMMA_EXPR_H
12 #define SIMPLIFY_COMMA_EXPR_H
13
14 #include <string>
15 #include "Transformation.h"
16
17 namespace clang {
18 class DeclGroupRef;
19 class ASTContext;
20 class Stmt;
21 class BinaryOperator;
22 }
23
24 class SimplifyCommaExprCollectionVisitor;
25 class SimplifyCommaExprStmtVisitor;
26
27 class SimplifyCommaExpr : public Transformation {
28 friend class SimplifyCommaExprCollectionVisitor;
29 friend class SimplifyCommaExprStmtVisitor;
30
31 public:
32
33 SimplifyCommaExpr(const char *TransName, const char *Desc)
34 : Transformation(TransName, Desc),
35 CollectionVisitor(NULL),
36 StmtVisitor(NULL),
37 TheBinaryOperator(NULL),
38 TheStmt(NULL),
39 NeedParen(false)
40 { }
41
42 ~SimplifyCommaExpr(void);
43
44 private:
45
46 virtual void Initialize(clang::ASTContext &context);
47
48 virtual bool HandleTopLevelDecl(clang::DeclGroupRef D);
49
50 virtual void HandleTranslationUnit(clang::ASTContext &Ctx);
51
52 void simplifyCommaExpr(void);
53
54 SimplifyCommaExprCollectionVisitor *CollectionVisitor;
55
56 SimplifyCommaExprStmtVisitor *StmtVisitor;
57
58 clang::BinaryOperator *TheBinaryOperator;
59
60 clang::Stmt *TheStmt;
61
62 bool NeedParen;
63
64 // Unimplemented
65 SimplifyCommaExpr(void);
66
67 SimplifyCommaExpr(const SimplifyCommaExpr &);
68
69 void operator=(const SimplifyCommaExpr &);
70 };
71 #endif