source: src/SymTab/FixFunction.h @ bc03be3

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumwith_gc
Last change on this file since bc03be3 was 4bda2cf, checked in by Rob Schluntz <rschlunt@…>, 7 years ago

Refactor FixFunction?, add error for void foo(void, ...)

  • Property mode set to 100644
File size: 1.6 KB
Line 
1//
2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// FixFunction.h --
8//
9// Author           : Richard C. Bilson
10// Created On       : Sun May 17 17:02:08 2015
11// Last Modified By : Peter A. Buhr
12// Last Modified On : Sat Jul 22 09:45:55 2017
13// Update Count     : 4
14//
15
16#pragma once
17
18#include "Common/PassVisitor.h" // for PassVisitor
19#include "SynTree/SynTree.h"    // for Types
20
21namespace SymTab {
22        /// Replaces function and array types by equivalent pointer types.
23        class FixFunction : public WithShortCircuiting {
24                typedef Mutator Parent;
25          public:
26                FixFunction();
27
28                void premutate(FunctionDecl *functionDecl);
29                DeclarationWithType* postmutate(FunctionDecl *functionDecl);
30
31                Type * postmutate(ArrayType * arrayType);
32
33                void premutate(ArrayType * arrayType);
34                void premutate(VoidType * voidType);
35                void premutate(BasicType * basicType);
36                void premutate(PointerType * pointerType);
37                void premutate(StructInstType * aggregateUseType);
38                void premutate(UnionInstType * aggregateUseType);
39                void premutate(EnumInstType * aggregateUseType);
40                void premutate(TraitInstType * aggregateUseType);
41                void premutate(TypeInstType * aggregateUseType);
42                void premutate(TupleType * tupleType);
43                void premutate(VarArgsType * varArgsType);
44                void premutate(ZeroType * zeroType);
45                void premutate(OneType * oneType);
46
47                bool isVoid;
48        };
49
50        bool fixFunction( DeclarationWithType *& );
51} // namespace SymTab
52
53// Local Variables: //
54// tab-width: 4 //
55// mode: c++ //
56// compile-command: "make install" //
57// End: //
Note: See TracBrowser for help on using the repository browser.