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