Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 1 | //===--- PrintParserActions.cpp - Implement -parse-print-callbacks mode ---===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 0bc735f | 2007-12-29 19:59:25 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This code simply runs the preprocessor on the input file and prints out the |
| 11 | // result. This is the traditional behavior of the -E option. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
Ted Kremenek | c2542b6 | 2009-03-31 18:58:14 +0000 | [diff] [blame] | 15 | #include "clang-cc.h" |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 16 | #include "clang/Parse/Action.h" |
| 17 | #include "clang/Parse/DeclSpec.h" |
Ted Kremenek | bdd30c2 | 2008-01-14 16:44:48 +0000 | [diff] [blame] | 18 | #include "llvm/Support/Streams.h" |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 19 | using namespace clang; |
| 20 | |
| 21 | namespace { |
| 22 | class ParserPrintActions : public MinimalAction { |
| 23 | |
Steve Naroff | b4292f2 | 2007-10-31 20:55:39 +0000 | [diff] [blame] | 24 | public: |
Daniel Dunbar | e10b0f2 | 2008-10-31 08:56:51 +0000 | [diff] [blame] | 25 | ParserPrintActions(Preprocessor &PP) : MinimalAction(PP) {} |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 26 | |
| 27 | // Printing Functions which also must call MinimalAction |
| 28 | |
Steve Naroff | 08d92e4 | 2007-09-15 18:49:24 +0000 | [diff] [blame] | 29 | /// ActOnDeclarator - This callback is invoked when a declarator is parsed |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 30 | /// and 'Init' specifies the initializer if any. This is for things like: |
| 31 | /// "int X = 4" or "typedef int foo". |
Chris Lattner | 682bf92 | 2009-03-29 16:50:03 +0000 | [diff] [blame] | 32 | virtual DeclPtrTy ActOnDeclarator(Scope *S, Declarator &D) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 33 | llvm::cout << __FUNCTION__ << " "; |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 34 | if (IdentifierInfo *II = D.getIdentifier()) { |
Ted Kremenek | bdd30c2 | 2008-01-14 16:44:48 +0000 | [diff] [blame] | 35 | llvm::cout << "'" << II->getName() << "'"; |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 36 | } else { |
Ted Kremenek | bdd30c2 | 2008-01-14 16:44:48 +0000 | [diff] [blame] | 37 | llvm::cout << "<anon>"; |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 38 | } |
Ted Kremenek | bdd30c2 | 2008-01-14 16:44:48 +0000 | [diff] [blame] | 39 | llvm::cout << "\n"; |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 40 | |
| 41 | // Pass up to EmptyActions so that the symbol table is maintained right. |
Chris Lattner | 682bf92 | 2009-03-29 16:50:03 +0000 | [diff] [blame] | 42 | return MinimalAction::ActOnDeclarator(S, D); |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 43 | } |
Steve Naroff | 640db42 | 2007-10-10 17:45:44 +0000 | [diff] [blame] | 44 | /// ActOnPopScope - This callback is called immediately before the specified |
| 45 | /// scope is popped and deleted. |
| 46 | virtual void ActOnPopScope(SourceLocation Loc, Scope *S) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 47 | llvm::cout << __FUNCTION__ << "\n"; |
| 48 | return MinimalAction::ActOnPopScope(Loc, S); |
| 49 | } |
| 50 | |
| 51 | /// ActOnTranslationUnitScope - This callback is called once, immediately |
| 52 | /// after creating the translation unit scope (in Parser::Initialize). |
| 53 | virtual void ActOnTranslationUnitScope(SourceLocation Loc, Scope *S) { |
| 54 | llvm::cout << __FUNCTION__ << "\n"; |
| 55 | MinimalAction::ActOnTranslationUnitScope(Loc, S); |
| 56 | } |
| 57 | |
| 58 | |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 59 | Action::DeclPtrTy ActOnStartClassInterface(SourceLocation AtInterfaceLoc, |
| 60 | IdentifierInfo *ClassName, |
| 61 | SourceLocation ClassLoc, |
| 62 | IdentifierInfo *SuperName, |
| 63 | SourceLocation SuperLoc, |
| 64 | const DeclPtrTy *ProtoRefs, |
| 65 | unsigned NumProtocols, |
| 66 | SourceLocation EndProtoLoc, |
| 67 | AttributeList *AttrList) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 68 | llvm::cout << __FUNCTION__ << "\n"; |
| 69 | return MinimalAction::ActOnStartClassInterface(AtInterfaceLoc, |
| 70 | ClassName, ClassLoc, |
| 71 | SuperName, SuperLoc, |
| 72 | ProtoRefs, NumProtocols, |
| 73 | EndProtoLoc, AttrList); |
| 74 | } |
| 75 | |
| 76 | /// ActOnForwardClassDeclaration - |
| 77 | /// Scope will always be top level file scope. |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 78 | Action::DeclPtrTy ActOnForwardClassDeclaration(SourceLocation AtClassLoc, |
| 79 | IdentifierInfo **IdentList, |
| 80 | unsigned NumElts) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 81 | llvm::cout << __FUNCTION__ << "\n"; |
| 82 | return MinimalAction::ActOnForwardClassDeclaration(AtClassLoc, IdentList, |
| 83 | NumElts); |
| 84 | } |
| 85 | |
| 86 | // Pure Printing |
| 87 | |
| 88 | /// ActOnParamDeclarator - This callback is invoked when a parameter |
| 89 | /// declarator is parsed. This callback only occurs for functions |
| 90 | /// with prototypes. S is the function prototype scope for the |
| 91 | /// parameters (C++ [basic.scope.proto]). |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 92 | virtual DeclPtrTy ActOnParamDeclarator(Scope *S, Declarator &D) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 93 | llvm::cout << __FUNCTION__ << " "; |
| 94 | if (IdentifierInfo *II = D.getIdentifier()) { |
| 95 | llvm::cout << "'" << II->getName() << "'"; |
| 96 | } else { |
| 97 | llvm::cout << "<anon>"; |
| 98 | } |
| 99 | llvm::cout << "\n"; |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 100 | return DeclPtrTy(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 101 | } |
| 102 | |
| 103 | /// AddInitializerToDecl - This action is called immediately after |
| 104 | /// ParseDeclarator (when an initializer is present). The code is factored |
| 105 | /// this way to make sure we are able to handle the following: |
| 106 | /// void func() { int xx = xx; } |
| 107 | /// This allows ActOnDeclarator to register "xx" prior to parsing the |
| 108 | /// initializer. The declaration above should still result in a warning, |
| 109 | /// since the reference to "xx" is uninitialized. |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 110 | virtual void AddInitializerToDecl(DeclPtrTy Dcl, ExprArg Init) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 111 | llvm::cout << __FUNCTION__ << "\n"; |
| 112 | } |
| 113 | |
Chris Lattner | 682bf92 | 2009-03-29 16:50:03 +0000 | [diff] [blame] | 114 | /// FinalizeDeclaratorGroup - After a sequence of declarators are parsed, |
| 115 | /// this gives the actions implementation a chance to process the group as |
| 116 | /// a whole. |
| 117 | virtual DeclGroupPtrTy FinalizeDeclaratorGroup(Scope *S, DeclPtrTy *Group, |
| 118 | unsigned NumDecls) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 119 | llvm::cout << __FUNCTION__ << "\n"; |
Chris Lattner | 682bf92 | 2009-03-29 16:50:03 +0000 | [diff] [blame] | 120 | return DeclGroupPtrTy(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 121 | } |
| 122 | |
| 123 | /// ActOnStartOfFunctionDef - This is called at the start of a function |
| 124 | /// definition, instead of calling ActOnDeclarator. The Declarator includes |
| 125 | /// information about formal arguments that are part of this function. |
Chris Lattner | 682bf92 | 2009-03-29 16:50:03 +0000 | [diff] [blame] | 126 | virtual DeclPtrTy ActOnStartOfFunctionDef(Scope *FnBodyScope, |
| 127 | Declarator &D){ |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 128 | llvm::cout << __FUNCTION__ << "\n"; |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 129 | return DeclPtrTy(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 130 | } |
| 131 | |
| 132 | /// ActOnStartOfFunctionDef - This is called at the start of a function |
| 133 | /// definition, after the FunctionDecl has already been created. |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 134 | virtual DeclPtrTy ActOnStartOfFunctionDef(Scope *FnBodyScope, DeclPtrTy D) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 135 | llvm::cout << __FUNCTION__ << "\n"; |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 136 | return DeclPtrTy(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 137 | } |
| 138 | |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 139 | virtual void ActOnStartOfObjCMethodDef(Scope *FnBodyScope, DeclPtrTy D) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 140 | llvm::cout << __FUNCTION__ << "\n"; |
| 141 | } |
| 142 | |
| 143 | /// ActOnFunctionDefBody - This is called when a function body has completed |
| 144 | /// parsing. Decl is the DeclTy returned by ParseStartOfFunctionDef. |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 145 | virtual DeclPtrTy ActOnFinishFunctionBody(DeclPtrTy Decl, StmtArg Body) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 146 | llvm::cout << __FUNCTION__ << "\n"; |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 147 | return DeclPtrTy(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 148 | } |
| 149 | |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 150 | virtual DeclPtrTy ActOnFileScopeAsmDecl(SourceLocation Loc, |
| 151 | ExprArg AsmString) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 152 | llvm::cout << __FUNCTION__ << "\n"; |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 153 | return DeclPtrTy(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 154 | } |
| 155 | |
| 156 | /// ParsedFreeStandingDeclSpec - This method is invoked when a declspec with |
| 157 | /// no declarator (e.g. "struct foo;") is parsed. |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 158 | virtual DeclPtrTy ParsedFreeStandingDeclSpec(Scope *S, DeclSpec &DS) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 159 | llvm::cout << __FUNCTION__ << "\n"; |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 160 | return DeclPtrTy(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 161 | } |
Douglas Gregor | e79837a | 2008-12-17 01:46:43 +0000 | [diff] [blame] | 162 | |
| 163 | /// ActOnLinkageSpec - Parsed a C++ linkage-specification that |
| 164 | /// contained braces. Lang/StrSize contains the language string that |
| 165 | /// was parsed at location Loc. Decls/NumDecls provides the |
| 166 | /// declarations parsed inside the linkage specification. |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 167 | virtual DeclPtrTy ActOnLinkageSpec(SourceLocation Loc, |
| 168 | SourceLocation LBrace, |
| 169 | SourceLocation RBrace, const char *Lang, |
| 170 | unsigned StrSize, |
| 171 | DeclPtrTy *Decls, unsigned NumDecls) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 172 | llvm::cout << __FUNCTION__ << "\n"; |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 173 | return DeclPtrTy(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 174 | } |
Douglas Gregor | e79837a | 2008-12-17 01:46:43 +0000 | [diff] [blame] | 175 | |
| 176 | /// ActOnLinkageSpec - Parsed a C++ linkage-specification without |
| 177 | /// braces. Lang/StrSize contains the language string that was |
| 178 | /// parsed at location Loc. D is the declaration parsed. |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 179 | virtual DeclPtrTy ActOnLinkageSpec(SourceLocation Loc, const char *Lang, |
| 180 | unsigned StrSize, DeclPtrTy D) { |
| 181 | return DeclPtrTy(); |
Douglas Gregor | e79837a | 2008-12-17 01:46:43 +0000 | [diff] [blame] | 182 | } |
| 183 | |
Mike Stump | c6e35aa | 2009-05-16 07:06:02 +0000 | [diff] [blame] | 184 | //===------------------------------------------------------------------===// |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 185 | // Type Parsing Callbacks. |
Mike Stump | c6e35aa | 2009-05-16 07:06:02 +0000 | [diff] [blame] | 186 | //===------------------------------------------------------------------===// |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 187 | |
Sebastian Redl | cee63fb | 2008-12-02 14:43:59 +0000 | [diff] [blame] | 188 | virtual TypeResult ActOnTypeName(Scope *S, Declarator &D) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 189 | llvm::cout << __FUNCTION__ << "\n"; |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 190 | return TypeResult(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 191 | } |
| 192 | |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 193 | virtual DeclPtrTy ActOnTag(Scope *S, unsigned TagType, TagKind TK, |
| 194 | SourceLocation KWLoc, const CXXScopeSpec &SS, |
| 195 | IdentifierInfo *Name, SourceLocation NameLoc, |
| 196 | AttributeList *Attr, AccessSpecifier AS) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 197 | // TagType is an instance of DeclSpec::TST, indicating what kind of tag this |
| 198 | // is (struct/union/enum/class). |
| 199 | llvm::cout << __FUNCTION__ << "\n"; |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 200 | return DeclPtrTy(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 201 | } |
| 202 | |
| 203 | /// Act on @defs() element found when parsing a structure. ClassName is the |
| 204 | /// name of the referenced class. |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 205 | virtual void ActOnDefs(Scope *S, DeclPtrTy TagD, SourceLocation DeclStart, |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 206 | IdentifierInfo *ClassName, |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 207 | llvm::SmallVectorImpl<DeclPtrTy> &Decls) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 208 | llvm::cout << __FUNCTION__ << "\n"; |
| 209 | } |
| 210 | |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 211 | virtual DeclPtrTy ActOnField(Scope *S, DeclPtrTy TagD, |
| 212 | SourceLocation DeclStart, |
| 213 | Declarator &D, ExprTy *BitfieldWidth) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 214 | llvm::cout << __FUNCTION__ << "\n"; |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 215 | return DeclPtrTy(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 216 | } |
| 217 | |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 218 | virtual DeclPtrTy ActOnIvar(Scope *S, SourceLocation DeclStart, |
| 219 | Declarator &D, ExprTy *BitfieldWidth, |
| 220 | tok::ObjCKeywordKind visibility) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 221 | llvm::cout << __FUNCTION__ << "\n"; |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 222 | return DeclPtrTy(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 223 | } |
| 224 | |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 225 | virtual void ActOnFields(Scope* S, SourceLocation RecLoc, DeclPtrTy TagDecl, |
| 226 | DeclPtrTy *Fields, unsigned NumFields, |
Daniel Dunbar | 1bfe1c2 | 2008-10-03 02:03:53 +0000 | [diff] [blame] | 227 | SourceLocation LBrac, SourceLocation RBrac, |
| 228 | AttributeList *AttrList) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 229 | llvm::cout << __FUNCTION__ << "\n"; |
| 230 | } |
| 231 | |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 232 | virtual DeclPtrTy ActOnEnumConstant(Scope *S, DeclPtrTy EnumDecl, |
| 233 | DeclPtrTy LastEnumConstant, |
| 234 | SourceLocation IdLoc,IdentifierInfo *Id, |
| 235 | SourceLocation EqualLoc, ExprTy *Val) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 236 | llvm::cout << __FUNCTION__ << "\n"; |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 237 | return DeclPtrTy(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 238 | } |
| 239 | |
Mike Stump | c6e35aa | 2009-05-16 07:06:02 +0000 | [diff] [blame] | 240 | virtual void ActOnEnumBody(SourceLocation EnumLoc, SourceLocation LBraceLoc, |
| 241 | SourceLocation RBraceLoc, DeclPtrTy EnumDecl, |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 242 | DeclPtrTy *Elements, unsigned NumElements) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 243 | llvm::cout << __FUNCTION__ << "\n"; |
| 244 | } |
| 245 | |
Mike Stump | c6e35aa | 2009-05-16 07:06:02 +0000 | [diff] [blame] | 246 | //===------------------------------------------------------------------===// |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 247 | // Statement Parsing Callbacks. |
Mike Stump | c6e35aa | 2009-05-16 07:06:02 +0000 | [diff] [blame] | 248 | //===------------------------------------------------------------------===// |
Sebastian Redl | a60528c | 2008-12-21 12:04:03 +0000 | [diff] [blame] | 249 | |
| 250 | virtual OwningStmtResult ActOnNullStmt(SourceLocation SemiLoc) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 251 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | a60528c | 2008-12-21 12:04:03 +0000 | [diff] [blame] | 252 | return StmtEmpty(); |
| 253 | } |
| 254 | |
| 255 | virtual OwningStmtResult ActOnCompoundStmt(SourceLocation L, |
| 256 | SourceLocation R, |
| 257 | MultiStmtArg Elts, |
| 258 | bool isStmtExpr) { |
| 259 | llvm::cout << __FUNCTION__ << "\n"; |
| 260 | return StmtEmpty(); |
| 261 | } |
Chris Lattner | 682bf92 | 2009-03-29 16:50:03 +0000 | [diff] [blame] | 262 | virtual OwningStmtResult ActOnDeclStmt(DeclGroupPtrTy Decl, |
Sebastian Redl | a60528c | 2008-12-21 12:04:03 +0000 | [diff] [blame] | 263 | SourceLocation StartLoc, |
| 264 | SourceLocation EndLoc) { |
| 265 | llvm::cout << __FUNCTION__ << "\n"; |
| 266 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 267 | } |
| 268 | |
Sebastian Redl | a60528c | 2008-12-21 12:04:03 +0000 | [diff] [blame] | 269 | virtual OwningStmtResult ActOnExprStmt(ExprArg Expr) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 270 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | a60528c | 2008-12-21 12:04:03 +0000 | [diff] [blame] | 271 | return OwningStmtResult(*this, Expr.release()); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 272 | } |
| 273 | |
| 274 | /// ActOnCaseStmt - Note that this handles the GNU 'case 1 ... 4' extension, |
| 275 | /// which can specify an RHS value. |
Sebastian Redl | 117054a | 2008-12-28 16:13:43 +0000 | [diff] [blame] | 276 | virtual OwningStmtResult ActOnCaseStmt(SourceLocation CaseLoc, |
| 277 | ExprArg LHSVal, |
| 278 | SourceLocation DotDotDotLoc, |
| 279 | ExprArg RHSVal, |
Chris Lattner | 24e1e70 | 2009-03-04 04:23:07 +0000 | [diff] [blame] | 280 | SourceLocation ColonLoc) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 281 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | 117054a | 2008-12-28 16:13:43 +0000 | [diff] [blame] | 282 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 283 | } |
Sebastian Redl | 117054a | 2008-12-28 16:13:43 +0000 | [diff] [blame] | 284 | virtual OwningStmtResult ActOnDefaultStmt(SourceLocation DefaultLoc, |
| 285 | SourceLocation ColonLoc, |
| 286 | StmtArg SubStmt, Scope *CurScope){ |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 287 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | 117054a | 2008-12-28 16:13:43 +0000 | [diff] [blame] | 288 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 289 | } |
Sebastian Redl | de30747 | 2009-01-11 00:38:46 +0000 | [diff] [blame] | 290 | |
| 291 | virtual OwningStmtResult ActOnLabelStmt(SourceLocation IdentLoc, |
| 292 | IdentifierInfo *II, |
| 293 | SourceLocation ColonLoc, |
| 294 | StmtArg SubStmt) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 295 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | de30747 | 2009-01-11 00:38:46 +0000 | [diff] [blame] | 296 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 297 | } |
Sebastian Redl | de30747 | 2009-01-11 00:38:46 +0000 | [diff] [blame] | 298 | |
| 299 | virtual OwningStmtResult ActOnIfStmt(SourceLocation IfLoc, ExprArg CondVal, |
| 300 | StmtArg ThenVal,SourceLocation ElseLoc, |
| 301 | StmtArg ElseVal) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 302 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | de30747 | 2009-01-11 00:38:46 +0000 | [diff] [blame] | 303 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 304 | } |
Sebastian Redl | de30747 | 2009-01-11 00:38:46 +0000 | [diff] [blame] | 305 | |
| 306 | virtual OwningStmtResult ActOnStartOfSwitchStmt(ExprArg Cond) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 307 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | de30747 | 2009-01-11 00:38:46 +0000 | [diff] [blame] | 308 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 309 | } |
Sebastian Redl | de30747 | 2009-01-11 00:38:46 +0000 | [diff] [blame] | 310 | |
| 311 | virtual OwningStmtResult ActOnFinishSwitchStmt(SourceLocation SwitchLoc, |
| 312 | StmtArg Switch, |
| 313 | StmtArg Body) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 314 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | de30747 | 2009-01-11 00:38:46 +0000 | [diff] [blame] | 315 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 316 | } |
| 317 | |
Sebastian Redl | f05b152 | 2009-01-16 23:28:06 +0000 | [diff] [blame] | 318 | virtual OwningStmtResult ActOnWhileStmt(SourceLocation WhileLoc, |
| 319 | ExprArg Cond, StmtArg Body) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 320 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | f05b152 | 2009-01-16 23:28:06 +0000 | [diff] [blame] | 321 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 322 | } |
Sebastian Redl | f05b152 | 2009-01-16 23:28:06 +0000 | [diff] [blame] | 323 | virtual OwningStmtResult ActOnDoStmt(SourceLocation DoLoc, StmtArg Body, |
| 324 | SourceLocation WhileLoc, ExprArg Cond){ |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 325 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | f05b152 | 2009-01-16 23:28:06 +0000 | [diff] [blame] | 326 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 327 | } |
Sebastian Redl | f05b152 | 2009-01-16 23:28:06 +0000 | [diff] [blame] | 328 | virtual OwningStmtResult ActOnForStmt(SourceLocation ForLoc, |
| 329 | SourceLocation LParenLoc, |
| 330 | StmtArg First, ExprArg Second, |
| 331 | ExprArg Third, SourceLocation RParenLoc, |
| 332 | StmtArg Body) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 333 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | f05b152 | 2009-01-16 23:28:06 +0000 | [diff] [blame] | 334 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 335 | } |
Sebastian Redl | f05b152 | 2009-01-16 23:28:06 +0000 | [diff] [blame] | 336 | virtual OwningStmtResult ActOnObjCForCollectionStmt( |
| 337 | SourceLocation ForColLoc, |
| 338 | SourceLocation LParenLoc, |
| 339 | StmtArg First, ExprArg Second, |
| 340 | SourceLocation RParenLoc, StmtArg Body) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 341 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | f05b152 | 2009-01-16 23:28:06 +0000 | [diff] [blame] | 342 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 343 | } |
Sebastian Redl | 4cffe2f | 2009-01-18 13:19:59 +0000 | [diff] [blame] | 344 | virtual OwningStmtResult ActOnGotoStmt(SourceLocation GotoLoc, |
| 345 | SourceLocation LabelLoc, |
| 346 | IdentifierInfo *LabelII) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 347 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | 4cffe2f | 2009-01-18 13:19:59 +0000 | [diff] [blame] | 348 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 349 | } |
Sebastian Redl | 4cffe2f | 2009-01-18 13:19:59 +0000 | [diff] [blame] | 350 | virtual OwningStmtResult ActOnIndirectGotoStmt(SourceLocation GotoLoc, |
| 351 | SourceLocation StarLoc, |
| 352 | ExprArg DestExp) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 353 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | 4cffe2f | 2009-01-18 13:19:59 +0000 | [diff] [blame] | 354 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 355 | } |
Sebastian Redl | 4cffe2f | 2009-01-18 13:19:59 +0000 | [diff] [blame] | 356 | virtual OwningStmtResult ActOnContinueStmt(SourceLocation ContinueLoc, |
| 357 | Scope *CurScope) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 358 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | 4cffe2f | 2009-01-18 13:19:59 +0000 | [diff] [blame] | 359 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 360 | } |
Sebastian Redl | 4cffe2f | 2009-01-18 13:19:59 +0000 | [diff] [blame] | 361 | virtual OwningStmtResult ActOnBreakStmt(SourceLocation GotoLoc, |
| 362 | Scope *CurScope) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 363 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | 4cffe2f | 2009-01-18 13:19:59 +0000 | [diff] [blame] | 364 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 365 | } |
Sebastian Redl | 4cffe2f | 2009-01-18 13:19:59 +0000 | [diff] [blame] | 366 | virtual OwningStmtResult ActOnReturnStmt(SourceLocation ReturnLoc, |
| 367 | ExprArg RetValExp) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 368 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | 4cffe2f | 2009-01-18 13:19:59 +0000 | [diff] [blame] | 369 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 370 | } |
Sebastian Redl | 3037ed0 | 2009-01-18 16:53:17 +0000 | [diff] [blame] | 371 | virtual OwningStmtResult ActOnAsmStmt(SourceLocation AsmLoc, |
Mike Stump | c6e35aa | 2009-05-16 07:06:02 +0000 | [diff] [blame] | 372 | bool IsSimple, |
Sebastian Redl | 3037ed0 | 2009-01-18 16:53:17 +0000 | [diff] [blame] | 373 | bool IsVolatile, |
| 374 | unsigned NumOutputs, |
| 375 | unsigned NumInputs, |
| 376 | std::string *Names, |
| 377 | MultiExprArg Constraints, |
| 378 | MultiExprArg Exprs, |
| 379 | ExprArg AsmString, |
| 380 | MultiExprArg Clobbers, |
| 381 | SourceLocation RParenLoc) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 382 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | 3037ed0 | 2009-01-18 16:53:17 +0000 | [diff] [blame] | 383 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 384 | } |
Sebastian Redl | 3037ed0 | 2009-01-18 16:53:17 +0000 | [diff] [blame] | 385 | |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 386 | // Objective-c statements |
Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 387 | virtual OwningStmtResult ActOnObjCAtCatchStmt(SourceLocation AtLoc, |
| 388 | SourceLocation RParen, |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 389 | DeclPtrTy Parm, StmtArg Body, |
Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 390 | StmtArg CatchList) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 391 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 392 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 393 | } |
Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 394 | |
| 395 | virtual OwningStmtResult ActOnObjCAtFinallyStmt(SourceLocation AtLoc, |
| 396 | StmtArg Body) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 397 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 398 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 399 | } |
Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 400 | |
| 401 | virtual OwningStmtResult ActOnObjCAtTryStmt(SourceLocation AtLoc, |
| 402 | StmtArg Try, StmtArg Catch, |
| 403 | StmtArg Finally) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 404 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 405 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 406 | } |
Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 407 | |
| 408 | virtual OwningStmtResult ActOnObjCAtThrowStmt(SourceLocation AtLoc, |
Steve Naroff | e21dd6f | 2009-02-11 20:05:44 +0000 | [diff] [blame] | 409 | ExprArg Throw, |
| 410 | Scope *CurScope) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 411 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 412 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 413 | } |
Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 414 | |
| 415 | virtual OwningStmtResult ActOnObjCAtSynchronizedStmt(SourceLocation AtLoc, |
| 416 | ExprArg SynchExpr, |
| 417 | StmtArg SynchBody) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 418 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 419 | return StmtEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 420 | } |
Sebastian Redl | a0fd865 | 2008-12-21 16:41:36 +0000 | [diff] [blame] | 421 | |
| 422 | // C++ Statements |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 423 | virtual DeclPtrTy ActOnExceptionDeclarator(Scope *S, Declarator &D) { |
Sebastian Redl | a0fd865 | 2008-12-21 16:41:36 +0000 | [diff] [blame] | 424 | llvm::cout << __FUNCTION__ << "\n"; |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 425 | return DeclPtrTy(); |
Sebastian Redl | a0fd865 | 2008-12-21 16:41:36 +0000 | [diff] [blame] | 426 | } |
| 427 | |
| 428 | virtual OwningStmtResult ActOnCXXCatchBlock(SourceLocation CatchLoc, |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 429 | DeclPtrTy ExceptionDecl, |
Sebastian Redl | a0fd865 | 2008-12-21 16:41:36 +0000 | [diff] [blame] | 430 | StmtArg HandlerBlock) { |
| 431 | llvm::cout << __FUNCTION__ << "\n"; |
| 432 | return StmtEmpty(); |
| 433 | } |
| 434 | |
| 435 | virtual OwningStmtResult ActOnCXXTryBlock(SourceLocation TryLoc, |
| 436 | StmtArg TryBlock, |
| 437 | MultiStmtArg Handlers) { |
| 438 | llvm::cout << __FUNCTION__ << "\n"; |
| 439 | return StmtEmpty(); |
| 440 | } |
| 441 | |
Mike Stump | c6e35aa | 2009-05-16 07:06:02 +0000 | [diff] [blame] | 442 | //===------------------------------------------------------------------===// |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 443 | // Expression Parsing Callbacks. |
Mike Stump | c6e35aa | 2009-05-16 07:06:02 +0000 | [diff] [blame] | 444 | //===------------------------------------------------------------------===// |
Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 445 | |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 446 | // Primary Expressions. |
Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 447 | |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 448 | /// ActOnIdentifierExpr - Parse an identifier in expression context. |
| 449 | /// 'HasTrailingLParen' indicates whether or not the identifier has a '(' |
| 450 | /// token immediately after it. |
Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 451 | virtual OwningExprResult ActOnIdentifierExpr(Scope *S, SourceLocation Loc, |
| 452 | IdentifierInfo &II, |
| 453 | bool HasTrailingLParen, |
Sebastian Redl | ebc07d5 | 2009-02-03 20:19:35 +0000 | [diff] [blame] | 454 | const CXXScopeSpec *SS, |
| 455 | bool isAddressOfOperand) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 456 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 457 | return ExprEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 458 | } |
| 459 | |
Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 460 | virtual OwningExprResult ActOnCXXOperatorFunctionIdExpr( |
| 461 | Scope *S, SourceLocation OperatorLoc, |
| 462 | OverloadedOperatorKind Op, |
Sebastian Redl | ebc07d5 | 2009-02-03 20:19:35 +0000 | [diff] [blame] | 463 | bool HasTrailingLParen, const CXXScopeSpec &SS, |
| 464 | bool isAddressOfOperand) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 465 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 466 | return ExprEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 467 | } |
| 468 | |
Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 469 | virtual OwningExprResult ActOnCXXConversionFunctionExpr( |
| 470 | Scope *S, SourceLocation OperatorLoc, |
| 471 | TypeTy *Type, bool HasTrailingLParen, |
Sebastian Redl | ebc07d5 | 2009-02-03 20:19:35 +0000 | [diff] [blame] | 472 | const CXXScopeSpec &SS,bool isAddressOfOperand) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 473 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 474 | return ExprEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 475 | } |
Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 476 | |
| 477 | virtual OwningExprResult ActOnPredefinedExpr(SourceLocation Loc, |
| 478 | tok::TokenKind Kind) { |
| 479 | llvm::cout << __FUNCTION__ << "\n"; |
| 480 | return ExprEmpty(); |
| 481 | } |
| 482 | |
| 483 | virtual OwningExprResult ActOnCharacterConstant(const Token &) { |
| 484 | llvm::cout << __FUNCTION__ << "\n"; |
| 485 | return ExprEmpty(); |
| 486 | } |
| 487 | |
| 488 | virtual OwningExprResult ActOnNumericConstant(const Token &) { |
| 489 | llvm::cout << __FUNCTION__ << "\n"; |
| 490 | return ExprEmpty(); |
| 491 | } |
| 492 | |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 493 | /// ActOnStringLiteral - The specified tokens were lexed as pasted string |
| 494 | /// fragments (e.g. "foo" "bar" L"baz"). |
Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 495 | virtual OwningExprResult ActOnStringLiteral(const Token *Toks, |
| 496 | unsigned NumToks) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 497 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 498 | return ExprEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 499 | } |
Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 500 | |
| 501 | virtual OwningExprResult ActOnParenExpr(SourceLocation L, SourceLocation R, |
| 502 | ExprArg Val) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 503 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | 76ad2e8 | 2009-02-05 15:02:23 +0000 | [diff] [blame] | 504 | return move(Val); // Default impl returns operand. |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 505 | } |
Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 506 | |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 507 | // Postfix Expressions. |
Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 508 | virtual OwningExprResult ActOnPostfixUnaryOp(Scope *S, SourceLocation OpLoc, |
| 509 | tok::TokenKind Kind, |
| 510 | ExprArg Input) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 511 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 512 | return ExprEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 513 | } |
Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 514 | virtual OwningExprResult ActOnArraySubscriptExpr(Scope *S, ExprArg Base, |
| 515 | SourceLocation LLoc, |
| 516 | ExprArg Idx, |
| 517 | SourceLocation RLoc) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 518 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 519 | return ExprEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 520 | } |
Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 521 | virtual OwningExprResult ActOnMemberReferenceExpr(Scope *S, ExprArg Base, |
| 522 | SourceLocation OpLoc, |
| 523 | tok::TokenKind OpKind, |
| 524 | SourceLocation MemberLoc, |
Fariborz Jahanian | a6e3ac5 | 2009-03-04 22:30:12 +0000 | [diff] [blame] | 525 | IdentifierInfo &Member, |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 526 | DeclPtrTy ImplDecl) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 527 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 528 | return ExprEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 529 | } |
Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 530 | |
| 531 | virtual OwningExprResult ActOnCallExpr(Scope *S, ExprArg Fn, |
| 532 | SourceLocation LParenLoc, |
| 533 | MultiExprArg Args, |
| 534 | SourceLocation *CommaLocs, |
| 535 | SourceLocation RParenLoc) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 536 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 537 | return ExprEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 538 | } |
Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 539 | |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 540 | // Unary Operators. 'Tok' is the token for the operator. |
Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 541 | virtual OwningExprResult ActOnUnaryOp(Scope *S, SourceLocation OpLoc, |
| 542 | tok::TokenKind Op, ExprArg Input) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 543 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 544 | return ExprEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 545 | } |
Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 546 | virtual OwningExprResult |
| 547 | ActOnSizeOfAlignOfExpr(SourceLocation OpLoc, bool isSizeof, bool isType, |
| 548 | void *TyOrEx, const SourceRange &ArgRange) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 549 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 550 | return ExprEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 551 | } |
Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 552 | |
| 553 | virtual OwningExprResult ActOnCompoundLiteral(SourceLocation LParen, |
| 554 | TypeTy *Ty, |
| 555 | SourceLocation RParen, |
| 556 | ExprArg Op) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 557 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 558 | return ExprEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 559 | } |
Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 560 | virtual OwningExprResult ActOnInitList(SourceLocation LParenLoc, |
| 561 | MultiExprArg InitList, |
Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 562 | SourceLocation RParenLoc) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 563 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 564 | return ExprEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 565 | } |
Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 566 | virtual OwningExprResult ActOnCastExpr(SourceLocation LParenLoc, TypeTy *Ty, |
| 567 | SourceLocation RParenLoc,ExprArg Op){ |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 568 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 569 | return ExprEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 570 | } |
Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 571 | |
| 572 | virtual OwningExprResult ActOnBinOp(Scope *S, SourceLocation TokLoc, |
| 573 | tok::TokenKind Kind, |
| 574 | ExprArg LHS, ExprArg RHS) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 575 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 576 | return ExprEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 577 | } |
| 578 | |
| 579 | /// ActOnConditionalOp - Parse a ?: operation. Note that 'LHS' may be null |
| 580 | /// in the case of a the GNU conditional expr extension. |
Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 581 | virtual OwningExprResult ActOnConditionalOp(SourceLocation QuestionLoc, |
| 582 | SourceLocation ColonLoc, |
| 583 | ExprArg Cond, ExprArg LHS, |
| 584 | ExprArg RHS) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 585 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 586 | return ExprEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 587 | } |
Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 588 | |
| 589 | //===--------------------- GNU Extension Expressions ------------------===// |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 590 | |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 591 | virtual OwningExprResult ActOnAddrLabel(SourceLocation OpLoc, |
| 592 | SourceLocation LabLoc, |
| 593 | IdentifierInfo *LabelII) {// "&&foo" |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 594 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 595 | return ExprEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 596 | } |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 597 | |
| 598 | virtual OwningExprResult ActOnStmtExpr(SourceLocation LPLoc, |
| 599 | StmtArg SubStmt, |
| 600 | SourceLocation RPLoc) { // "({..})" |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 601 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 602 | return ExprEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 603 | } |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 604 | |
| 605 | virtual OwningExprResult ActOnBuiltinOffsetOf(Scope *S, |
| 606 | SourceLocation BuiltinLoc, |
| 607 | SourceLocation TypeLoc, |
| 608 | TypeTy *Arg1, |
| 609 | OffsetOfComponent *CompPtr, |
| 610 | unsigned NumComponents, |
| 611 | SourceLocation RParenLoc) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 612 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 613 | return ExprEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 614 | } |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 615 | |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 616 | // __builtin_types_compatible_p(type1, type2) |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 617 | virtual OwningExprResult ActOnTypesCompatibleExpr(SourceLocation BuiltinLoc, |
| 618 | TypeTy *arg1,TypeTy *arg2, |
| 619 | SourceLocation RPLoc) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 620 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 621 | return ExprEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 622 | } |
| 623 | // __builtin_choose_expr(constExpr, expr1, expr2) |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 624 | virtual OwningExprResult ActOnChooseExpr(SourceLocation BuiltinLoc, |
| 625 | ExprArg cond, ExprArg expr1, |
| 626 | ExprArg expr2, |
| 627 | SourceLocation RPLoc) { |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 628 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 629 | return ExprEmpty(); |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 630 | } |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 631 | |
| 632 | // __builtin_va_arg(expr, type) |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 633 | virtual OwningExprResult ActOnVAArg(SourceLocation BuiltinLoc, |
| 634 | ExprArg expr, TypeTy *type, |
Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 635 | SourceLocation RPLoc) { |
| 636 | llvm::cout << __FUNCTION__ << "\n"; |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 637 | return ExprEmpty(); |
| 638 | } |
| 639 | |
| 640 | virtual OwningExprResult ActOnGNUNullExpr(SourceLocation TokenLoc) { |
| 641 | llvm::cout << __FUNCTION__ << "\n"; |
| 642 | return ExprEmpty(); |
| 643 | } |
| 644 | |
| 645 | virtual void ActOnBlockStart(SourceLocation CaretLoc, Scope *CurScope) { |
| 646 | llvm::cout << __FUNCTION__ << "\n"; |
| 647 | } |
| 648 | |
| 649 | virtual void ActOnBlockArguments(Declarator &ParamInfo, Scope *CurScope) { |
| 650 | llvm::cout << __FUNCTION__ << "\n"; |
| 651 | } |
| 652 | |
| 653 | virtual void ActOnBlockError(SourceLocation CaretLoc, Scope *CurScope) { |
| 654 | llvm::cout << __FUNCTION__ << "\n"; |
| 655 | } |
| 656 | |
| 657 | virtual OwningExprResult ActOnBlockStmtExpr(SourceLocation CaretLoc, |
| 658 | StmtArg Body, |
| 659 | Scope *CurScope) { |
| 660 | llvm::cout << __FUNCTION__ << "\n"; |
| 661 | return ExprEmpty(); |
| 662 | } |
| 663 | |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 664 | virtual DeclPtrTy ActOnStartNamespaceDef(Scope *S, SourceLocation IdentLoc, |
| 665 | IdentifierInfo *Ident, |
| 666 | SourceLocation LBrace) { |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 667 | llvm::cout << __FUNCTION__ << "\n"; |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 668 | return DeclPtrTy(); |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 669 | } |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 670 | |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 671 | virtual void ActOnFinishNamespaceDef(DeclPtrTy Dcl, SourceLocation RBrace) { |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 672 | llvm::cout << __FUNCTION__ << "\n"; |
| 673 | return; |
| 674 | } |
| 675 | |
| 676 | #if 0 |
| 677 | // FIXME: AttrList should be deleted by this function, but the definition |
| 678 | // would have to be available. |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 679 | virtual DeclPtrTy ActOnUsingDirective(Scope *CurScope, |
| 680 | SourceLocation UsingLoc, |
| 681 | SourceLocation NamespcLoc, |
| 682 | const CXXScopeSpec &SS, |
| 683 | SourceLocation IdentLoc, |
| 684 | IdentifierInfo *NamespcName, |
| 685 | AttributeList *AttrList) { |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 686 | llvm::cout << __FUNCTION__ << "\n"; |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 687 | return DeclPtrTy(); |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 688 | } |
| 689 | #endif |
| 690 | |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 691 | virtual void ActOnParamDefaultArgument(DeclPtrTy param, |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 692 | SourceLocation EqualLoc, |
| 693 | ExprArg defarg) { |
| 694 | llvm::cout << __FUNCTION__ << "\n"; |
| 695 | } |
| 696 | |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 697 | virtual void ActOnParamUnparsedDefaultArgument(DeclPtrTy param, |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 698 | SourceLocation EqualLoc) { |
| 699 | llvm::cout << __FUNCTION__ << "\n"; |
| 700 | } |
| 701 | |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 702 | virtual void ActOnParamDefaultArgumentError(DeclPtrTy param) { |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 703 | llvm::cout << __FUNCTION__ << "\n"; |
| 704 | } |
| 705 | |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 706 | virtual void AddCXXDirectInitializerToDecl(DeclPtrTy Dcl, |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 707 | SourceLocation LParenLoc, |
| 708 | MultiExprArg Exprs, |
| 709 | SourceLocation *CommaLocs, |
| 710 | SourceLocation RParenLoc) { |
| 711 | llvm::cout << __FUNCTION__ << "\n"; |
| 712 | return; |
| 713 | } |
| 714 | |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 715 | virtual void ActOnStartDelayedCXXMethodDeclaration(Scope *S, |
| 716 | DeclPtrTy Method) |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 717 | { |
| 718 | llvm::cout << __FUNCTION__ << "\n"; |
| 719 | } |
| 720 | |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 721 | virtual void ActOnDelayedCXXMethodParameter(Scope *S, DeclPtrTy Param) { |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 722 | llvm::cout << __FUNCTION__ << "\n"; |
| 723 | } |
| 724 | |
| 725 | virtual void ActOnFinishDelayedCXXMethodDeclaration(Scope *S, |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 726 | DeclPtrTy Method) { |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 727 | llvm::cout << __FUNCTION__ << "\n"; |
| 728 | } |
| 729 | |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 730 | virtual DeclPtrTy ActOnStaticAssertDeclaration(SourceLocation AssertLoc, |
| 731 | ExprArg AssertExpr, |
| 732 | ExprArg AssertMessageExpr) { |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 733 | llvm::cout << __FUNCTION__ << "\n"; |
Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 734 | return DeclPtrTy(); |
Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 735 | } |
| 736 | |
| 737 | virtual OwningExprResult ActOnCXXNamedCast(SourceLocation OpLoc, |
| 738 | tok::TokenKind Kind, |
| 739 | SourceLocation LAngleBracketLoc, |
| 740 | TypeTy *Ty, |
| 741 | SourceLocation RAngleBracketLoc, |
| 742 | SourceLocation LParenLoc, |
| 743 | ExprArg Op, |
| 744 | SourceLocation RParenLoc) { |
| 745 | llvm::cout << __FUNCTION__ << "\n"; |
| 746 | return ExprEmpty(); |
| 747 | } |
| 748 | |
| 749 | virtual OwningExprResult ActOnCXXTypeid(SourceLocation OpLoc, |
| 750 | SourceLocation LParenLoc, |
| 751 | bool isType, void *TyOrExpr, |
| 752 | SourceLocation RParenLoc) { |
| 753 | llvm::cout << __FUNCTION__ << "\n"; |
| 754 | return ExprEmpty(); |
| 755 | } |
| 756 | |
| 757 | virtual OwningExprResult ActOnCXXThis(SourceLocation ThisLoc) { |
| 758 | llvm::cout << __FUNCTION__ << "\n"; |
| 759 | return ExprEmpty(); |
| 760 | } |
| 761 | |
| 762 | virtual OwningExprResult ActOnCXXBoolLiteral(SourceLocation OpLoc, |
| 763 | tok::TokenKind Kind) { |
| 764 | llvm::cout << __FUNCTION__ << "\n"; |
| 765 | return ExprEmpty(); |
| 766 | } |
| 767 | |
| 768 | virtual OwningExprResult ActOnCXXThrow(SourceLocation OpLoc, ExprArg Op) { |
| 769 | llvm::cout << __FUNCTION__ << "\n"; |
| 770 | return ExprEmpty(); |
| 771 | } |
| 772 | |
| 773 | virtual OwningExprResult ActOnCXXTypeConstructExpr(SourceRange TypeRange, |
| 774 | TypeTy *TypeRep, |
| 775 | SourceLocation LParenLoc, |
| 776 | MultiExprArg Exprs, |
| 777 | SourceLocation *CommaLocs, |
| 778 | SourceLocation RParenLoc) { |
| 779 | llvm::cout << __FUNCTION__ << "\n"; |
| 780 | return ExprEmpty(); |
| 781 | } |
| 782 | |
| 783 | virtual OwningExprResult ActOnCXXConditionDeclarationExpr(Scope *S, |
| 784 | SourceLocation StartLoc, |
| 785 | Declarator &D, |
| 786 | SourceLocation EqualLoc, |
| 787 | ExprArg AssignExprVal) { |
| 788 | llvm::cout << __FUNCTION__ << "\n"; |
| 789 | return ExprEmpty(); |
| 790 | } |
| 791 | |
| 792 | virtual OwningExprResult ActOnCXXNew(SourceLocation StartLoc, |
| 793 | bool UseGlobal, |
| 794 | SourceLocation PlacementLParen, |
| 795 | MultiExprArg PlacementArgs, |
| 796 | SourceLocation PlacementRParen, |
| 797 | bool ParenTypeId, Declarator &D, |
| 798 | SourceLocation ConstructorLParen, |
| 799 | MultiExprArg ConstructorArgs, |
| 800 | SourceLocation ConstructorRParen) { |
| 801 | llvm::cout << __FUNCTION__ << "\n"; |
| 802 | return ExprEmpty(); |
| 803 | } |
| 804 | |
| 805 | virtual OwningExprResult ActOnCXXDelete(SourceLocation StartLoc, |
| 806 | bool UseGlobal, bool ArrayForm, |
| 807 | ExprArg Operand) { |
| 808 | llvm::cout << __FUNCTION__ << "\n"; |
| 809 | return ExprEmpty(); |
| 810 | } |
| 811 | |
| 812 | virtual OwningExprResult ActOnUnaryTypeTrait(UnaryTypeTrait OTT, |
| 813 | SourceLocation KWLoc, |
| 814 | SourceLocation LParen, |
| 815 | TypeTy *Ty, |
| 816 | SourceLocation RParen) { |
| 817 | llvm::cout << __FUNCTION__ << "\n"; |
| 818 | return ExprEmpty(); |
| 819 | } |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 820 | }; |
| 821 | } |
| 822 | |
Daniel Dunbar | e10b0f2 | 2008-10-31 08:56:51 +0000 | [diff] [blame] | 823 | MinimalAction *clang::CreatePrintParserActionsAction(Preprocessor &PP) { |
| 824 | return new ParserPrintActions(PP); |
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 825 | } |