| 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 |  | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 184 | //===--------------------------------------------------------------------===// | 
|  | 185 | // Type Parsing Callbacks. | 
|  | 186 | //===--------------------------------------------------------------------===// | 
|  | 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 |  | 
| Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 240 | virtual void ActOnEnumBody(SourceLocation EnumLoc, DeclPtrTy EnumDecl, | 
|  | 241 | DeclPtrTy *Elements, unsigned NumElements) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 242 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 243 | } | 
|  | 244 |  | 
|  | 245 | //===--------------------------------------------------------------------===// | 
|  | 246 | // Statement Parsing Callbacks. | 
|  | 247 | //===--------------------------------------------------------------------===// | 
| Sebastian Redl | a60528c | 2008-12-21 12:04:03 +0000 | [diff] [blame] | 248 |  | 
|  | 249 | virtual OwningStmtResult ActOnNullStmt(SourceLocation SemiLoc) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 250 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | a60528c | 2008-12-21 12:04:03 +0000 | [diff] [blame] | 251 | return StmtEmpty(); | 
|  | 252 | } | 
|  | 253 |  | 
|  | 254 | virtual OwningStmtResult ActOnCompoundStmt(SourceLocation L, | 
|  | 255 | SourceLocation R, | 
|  | 256 | MultiStmtArg Elts, | 
|  | 257 | bool isStmtExpr) { | 
|  | 258 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 259 | return StmtEmpty(); | 
|  | 260 | } | 
| Chris Lattner | 682bf92 | 2009-03-29 16:50:03 +0000 | [diff] [blame] | 261 | virtual OwningStmtResult ActOnDeclStmt(DeclGroupPtrTy Decl, | 
| Sebastian Redl | a60528c | 2008-12-21 12:04:03 +0000 | [diff] [blame] | 262 | SourceLocation StartLoc, | 
|  | 263 | SourceLocation EndLoc) { | 
|  | 264 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 265 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 266 | } | 
|  | 267 |  | 
| Sebastian Redl | a60528c | 2008-12-21 12:04:03 +0000 | [diff] [blame] | 268 | virtual OwningStmtResult ActOnExprStmt(ExprArg Expr) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 269 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | a60528c | 2008-12-21 12:04:03 +0000 | [diff] [blame] | 270 | return OwningStmtResult(*this, Expr.release()); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 271 | } | 
|  | 272 |  | 
|  | 273 | /// ActOnCaseStmt - Note that this handles the GNU 'case 1 ... 4' extension, | 
|  | 274 | /// which can specify an RHS value. | 
| Sebastian Redl | 117054a | 2008-12-28 16:13:43 +0000 | [diff] [blame] | 275 | virtual OwningStmtResult ActOnCaseStmt(SourceLocation CaseLoc, | 
|  | 276 | ExprArg LHSVal, | 
|  | 277 | SourceLocation DotDotDotLoc, | 
|  | 278 | ExprArg RHSVal, | 
| Chris Lattner | 24e1e70 | 2009-03-04 04:23:07 +0000 | [diff] [blame] | 279 | SourceLocation ColonLoc) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 280 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | 117054a | 2008-12-28 16:13:43 +0000 | [diff] [blame] | 281 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 282 | } | 
| Sebastian Redl | 117054a | 2008-12-28 16:13:43 +0000 | [diff] [blame] | 283 | virtual OwningStmtResult ActOnDefaultStmt(SourceLocation DefaultLoc, | 
|  | 284 | SourceLocation ColonLoc, | 
|  | 285 | StmtArg SubStmt, Scope *CurScope){ | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 286 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | 117054a | 2008-12-28 16:13:43 +0000 | [diff] [blame] | 287 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 288 | } | 
| Sebastian Redl | de30747 | 2009-01-11 00:38:46 +0000 | [diff] [blame] | 289 |  | 
|  | 290 | virtual OwningStmtResult ActOnLabelStmt(SourceLocation IdentLoc, | 
|  | 291 | IdentifierInfo *II, | 
|  | 292 | SourceLocation ColonLoc, | 
|  | 293 | StmtArg SubStmt) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 294 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | de30747 | 2009-01-11 00:38:46 +0000 | [diff] [blame] | 295 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 296 | } | 
| Sebastian Redl | de30747 | 2009-01-11 00:38:46 +0000 | [diff] [blame] | 297 |  | 
|  | 298 | virtual OwningStmtResult ActOnIfStmt(SourceLocation IfLoc, ExprArg CondVal, | 
|  | 299 | StmtArg ThenVal,SourceLocation ElseLoc, | 
|  | 300 | StmtArg ElseVal) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 301 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | de30747 | 2009-01-11 00:38:46 +0000 | [diff] [blame] | 302 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 303 | } | 
| Sebastian Redl | de30747 | 2009-01-11 00:38:46 +0000 | [diff] [blame] | 304 |  | 
|  | 305 | virtual OwningStmtResult ActOnStartOfSwitchStmt(ExprArg Cond) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 306 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | de30747 | 2009-01-11 00:38:46 +0000 | [diff] [blame] | 307 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 308 | } | 
| Sebastian Redl | de30747 | 2009-01-11 00:38:46 +0000 | [diff] [blame] | 309 |  | 
|  | 310 | virtual OwningStmtResult ActOnFinishSwitchStmt(SourceLocation SwitchLoc, | 
|  | 311 | StmtArg Switch, | 
|  | 312 | StmtArg Body) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 313 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | de30747 | 2009-01-11 00:38:46 +0000 | [diff] [blame] | 314 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 315 | } | 
|  | 316 |  | 
| Sebastian Redl | f05b152 | 2009-01-16 23:28:06 +0000 | [diff] [blame] | 317 | virtual OwningStmtResult ActOnWhileStmt(SourceLocation WhileLoc, | 
|  | 318 | ExprArg Cond, StmtArg Body) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 319 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | f05b152 | 2009-01-16 23:28:06 +0000 | [diff] [blame] | 320 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 321 | } | 
| Sebastian Redl | f05b152 | 2009-01-16 23:28:06 +0000 | [diff] [blame] | 322 | virtual OwningStmtResult ActOnDoStmt(SourceLocation DoLoc, StmtArg Body, | 
|  | 323 | SourceLocation WhileLoc, ExprArg Cond){ | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 324 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | f05b152 | 2009-01-16 23:28:06 +0000 | [diff] [blame] | 325 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 326 | } | 
| Sebastian Redl | f05b152 | 2009-01-16 23:28:06 +0000 | [diff] [blame] | 327 | virtual OwningStmtResult ActOnForStmt(SourceLocation ForLoc, | 
|  | 328 | SourceLocation LParenLoc, | 
|  | 329 | StmtArg First, ExprArg Second, | 
|  | 330 | ExprArg Third, SourceLocation RParenLoc, | 
|  | 331 | StmtArg Body) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 332 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | f05b152 | 2009-01-16 23:28:06 +0000 | [diff] [blame] | 333 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 334 | } | 
| Sebastian Redl | f05b152 | 2009-01-16 23:28:06 +0000 | [diff] [blame] | 335 | virtual OwningStmtResult ActOnObjCForCollectionStmt( | 
|  | 336 | SourceLocation ForColLoc, | 
|  | 337 | SourceLocation LParenLoc, | 
|  | 338 | StmtArg First, ExprArg Second, | 
|  | 339 | SourceLocation RParenLoc, StmtArg Body) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 340 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | f05b152 | 2009-01-16 23:28:06 +0000 | [diff] [blame] | 341 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 342 | } | 
| Sebastian Redl | 4cffe2f | 2009-01-18 13:19:59 +0000 | [diff] [blame] | 343 | virtual OwningStmtResult ActOnGotoStmt(SourceLocation GotoLoc, | 
|  | 344 | SourceLocation LabelLoc, | 
|  | 345 | IdentifierInfo *LabelII) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 346 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | 4cffe2f | 2009-01-18 13:19:59 +0000 | [diff] [blame] | 347 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 348 | } | 
| Sebastian Redl | 4cffe2f | 2009-01-18 13:19:59 +0000 | [diff] [blame] | 349 | virtual OwningStmtResult ActOnIndirectGotoStmt(SourceLocation GotoLoc, | 
|  | 350 | SourceLocation StarLoc, | 
|  | 351 | ExprArg DestExp) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 352 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | 4cffe2f | 2009-01-18 13:19:59 +0000 | [diff] [blame] | 353 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 354 | } | 
| Sebastian Redl | 4cffe2f | 2009-01-18 13:19:59 +0000 | [diff] [blame] | 355 | virtual OwningStmtResult ActOnContinueStmt(SourceLocation ContinueLoc, | 
|  | 356 | Scope *CurScope) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 357 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | 4cffe2f | 2009-01-18 13:19:59 +0000 | [diff] [blame] | 358 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 359 | } | 
| Sebastian Redl | 4cffe2f | 2009-01-18 13:19:59 +0000 | [diff] [blame] | 360 | virtual OwningStmtResult ActOnBreakStmt(SourceLocation GotoLoc, | 
|  | 361 | Scope *CurScope) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 362 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | 4cffe2f | 2009-01-18 13:19:59 +0000 | [diff] [blame] | 363 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 364 | } | 
| Sebastian Redl | 4cffe2f | 2009-01-18 13:19:59 +0000 | [diff] [blame] | 365 | virtual OwningStmtResult ActOnReturnStmt(SourceLocation ReturnLoc, | 
|  | 366 | ExprArg RetValExp) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 367 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | 4cffe2f | 2009-01-18 13:19:59 +0000 | [diff] [blame] | 368 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 369 | } | 
| Sebastian Redl | 3037ed0 | 2009-01-18 16:53:17 +0000 | [diff] [blame] | 370 | virtual OwningStmtResult ActOnAsmStmt(SourceLocation AsmLoc, | 
|  | 371 | bool IsSimple, | 
|  | 372 | bool IsVolatile, | 
|  | 373 | unsigned NumOutputs, | 
|  | 374 | unsigned NumInputs, | 
|  | 375 | std::string *Names, | 
|  | 376 | MultiExprArg Constraints, | 
|  | 377 | MultiExprArg Exprs, | 
|  | 378 | ExprArg AsmString, | 
|  | 379 | MultiExprArg Clobbers, | 
|  | 380 | SourceLocation RParenLoc) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 381 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | 3037ed0 | 2009-01-18 16:53:17 +0000 | [diff] [blame] | 382 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 383 | } | 
| Sebastian Redl | 3037ed0 | 2009-01-18 16:53:17 +0000 | [diff] [blame] | 384 |  | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 385 | // Objective-c statements | 
| Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 386 | virtual OwningStmtResult ActOnObjCAtCatchStmt(SourceLocation AtLoc, | 
|  | 387 | SourceLocation RParen, | 
| Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 388 | DeclPtrTy Parm, StmtArg Body, | 
| Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 389 | StmtArg CatchList) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 390 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 391 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 392 | } | 
| Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 393 |  | 
|  | 394 | virtual OwningStmtResult ActOnObjCAtFinallyStmt(SourceLocation AtLoc, | 
|  | 395 | StmtArg Body) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 396 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 397 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 398 | } | 
| Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 399 |  | 
|  | 400 | virtual OwningStmtResult ActOnObjCAtTryStmt(SourceLocation AtLoc, | 
|  | 401 | StmtArg Try, StmtArg Catch, | 
|  | 402 | StmtArg Finally) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 403 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 404 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 405 | } | 
| Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 406 |  | 
|  | 407 | virtual OwningStmtResult ActOnObjCAtThrowStmt(SourceLocation AtLoc, | 
| Steve Naroff | e21dd6f | 2009-02-11 20:05:44 +0000 | [diff] [blame] | 408 | ExprArg Throw, | 
|  | 409 | Scope *CurScope) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 410 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 411 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 412 | } | 
| Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 413 |  | 
|  | 414 | virtual OwningStmtResult ActOnObjCAtSynchronizedStmt(SourceLocation AtLoc, | 
|  | 415 | ExprArg SynchExpr, | 
|  | 416 | StmtArg SynchBody) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 417 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | 431e90e | 2009-01-18 17:43:11 +0000 | [diff] [blame] | 418 | return StmtEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 419 | } | 
| Sebastian Redl | a0fd865 | 2008-12-21 16:41:36 +0000 | [diff] [blame] | 420 |  | 
|  | 421 | // C++ Statements | 
| Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 422 | virtual DeclPtrTy ActOnExceptionDeclarator(Scope *S, Declarator &D) { | 
| Sebastian Redl | a0fd865 | 2008-12-21 16:41:36 +0000 | [diff] [blame] | 423 | llvm::cout << __FUNCTION__ << "\n"; | 
| Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 424 | return DeclPtrTy(); | 
| Sebastian Redl | a0fd865 | 2008-12-21 16:41:36 +0000 | [diff] [blame] | 425 | } | 
|  | 426 |  | 
|  | 427 | virtual OwningStmtResult ActOnCXXCatchBlock(SourceLocation CatchLoc, | 
| Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 428 | DeclPtrTy ExceptionDecl, | 
| Sebastian Redl | a0fd865 | 2008-12-21 16:41:36 +0000 | [diff] [blame] | 429 | StmtArg HandlerBlock) { | 
|  | 430 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 431 | return StmtEmpty(); | 
|  | 432 | } | 
|  | 433 |  | 
|  | 434 | virtual OwningStmtResult ActOnCXXTryBlock(SourceLocation TryLoc, | 
|  | 435 | StmtArg TryBlock, | 
|  | 436 | MultiStmtArg Handlers) { | 
|  | 437 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 438 | return StmtEmpty(); | 
|  | 439 | } | 
|  | 440 |  | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 441 | //===--------------------------------------------------------------------===// | 
|  | 442 | // Expression Parsing Callbacks. | 
|  | 443 | //===--------------------------------------------------------------------===// | 
| 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 | // Primary Expressions. | 
| Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 446 |  | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 447 | /// ActOnIdentifierExpr - Parse an identifier in expression context. | 
|  | 448 | /// 'HasTrailingLParen' indicates whether or not the identifier has a '(' | 
|  | 449 | /// token immediately after it. | 
| Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 450 | virtual OwningExprResult ActOnIdentifierExpr(Scope *S, SourceLocation Loc, | 
|  | 451 | IdentifierInfo &II, | 
|  | 452 | bool HasTrailingLParen, | 
| Sebastian Redl | ebc07d5 | 2009-02-03 20:19:35 +0000 | [diff] [blame] | 453 | const CXXScopeSpec *SS, | 
|  | 454 | bool isAddressOfOperand) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 455 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 456 | return ExprEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 457 | } | 
|  | 458 |  | 
| Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 459 | virtual OwningExprResult ActOnCXXOperatorFunctionIdExpr( | 
|  | 460 | Scope *S, SourceLocation OperatorLoc, | 
|  | 461 | OverloadedOperatorKind Op, | 
| Sebastian Redl | ebc07d5 | 2009-02-03 20:19:35 +0000 | [diff] [blame] | 462 | bool HasTrailingLParen, const CXXScopeSpec &SS, | 
|  | 463 | bool isAddressOfOperand) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 464 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 465 | return ExprEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 466 | } | 
|  | 467 |  | 
| Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 468 | virtual OwningExprResult ActOnCXXConversionFunctionExpr( | 
|  | 469 | Scope *S, SourceLocation OperatorLoc, | 
|  | 470 | TypeTy *Type, bool HasTrailingLParen, | 
| Sebastian Redl | ebc07d5 | 2009-02-03 20:19:35 +0000 | [diff] [blame] | 471 | const CXXScopeSpec &SS,bool isAddressOfOperand) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 472 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 473 | return ExprEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 474 | } | 
| Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 475 |  | 
|  | 476 | virtual OwningExprResult ActOnPredefinedExpr(SourceLocation Loc, | 
|  | 477 | tok::TokenKind Kind) { | 
|  | 478 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 479 | return ExprEmpty(); | 
|  | 480 | } | 
|  | 481 |  | 
|  | 482 | virtual OwningExprResult ActOnCharacterConstant(const Token &) { | 
|  | 483 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 484 | return ExprEmpty(); | 
|  | 485 | } | 
|  | 486 |  | 
|  | 487 | virtual OwningExprResult ActOnNumericConstant(const Token &) { | 
|  | 488 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 489 | return ExprEmpty(); | 
|  | 490 | } | 
|  | 491 |  | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 492 | /// ActOnStringLiteral - The specified tokens were lexed as pasted string | 
|  | 493 | /// fragments (e.g. "foo" "bar" L"baz"). | 
| Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 494 | virtual OwningExprResult ActOnStringLiteral(const Token *Toks, | 
|  | 495 | unsigned NumToks) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 496 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 497 | return ExprEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 498 | } | 
| Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 499 |  | 
|  | 500 | virtual OwningExprResult ActOnParenExpr(SourceLocation L, SourceLocation R, | 
|  | 501 | ExprArg Val) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 502 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | 76ad2e8 | 2009-02-05 15:02:23 +0000 | [diff] [blame] | 503 | return move(Val);  // Default impl returns operand. | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 504 | } | 
| Sebastian Redl | cd965b9 | 2009-01-18 18:53:16 +0000 | [diff] [blame] | 505 |  | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 506 | // Postfix Expressions. | 
| Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 507 | virtual OwningExprResult ActOnPostfixUnaryOp(Scope *S, SourceLocation OpLoc, | 
|  | 508 | tok::TokenKind Kind, | 
|  | 509 | ExprArg Input) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 510 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 511 | return ExprEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 512 | } | 
| Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 513 | virtual OwningExprResult ActOnArraySubscriptExpr(Scope *S, ExprArg Base, | 
|  | 514 | SourceLocation LLoc, | 
|  | 515 | ExprArg Idx, | 
|  | 516 | SourceLocation RLoc) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 517 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 518 | return ExprEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 519 | } | 
| Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 520 | virtual OwningExprResult ActOnMemberReferenceExpr(Scope *S, ExprArg Base, | 
|  | 521 | SourceLocation OpLoc, | 
|  | 522 | tok::TokenKind OpKind, | 
|  | 523 | SourceLocation MemberLoc, | 
| Fariborz Jahanian | a6e3ac5 | 2009-03-04 22:30:12 +0000 | [diff] [blame] | 524 | IdentifierInfo &Member, | 
| Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 525 | DeclPtrTy ImplDecl) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 526 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 527 | return ExprEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 528 | } | 
| Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 529 |  | 
|  | 530 | virtual OwningExprResult ActOnCallExpr(Scope *S, ExprArg Fn, | 
|  | 531 | SourceLocation LParenLoc, | 
|  | 532 | MultiExprArg Args, | 
|  | 533 | SourceLocation *CommaLocs, | 
|  | 534 | SourceLocation RParenLoc) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 535 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 536 | return ExprEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 537 | } | 
| Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 538 |  | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 539 | // Unary Operators.  'Tok' is the token for the operator. | 
| Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 540 | virtual OwningExprResult ActOnUnaryOp(Scope *S, SourceLocation OpLoc, | 
|  | 541 | tok::TokenKind Op, ExprArg Input) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 542 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 543 | return ExprEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 544 | } | 
| Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 545 | virtual OwningExprResult | 
|  | 546 | ActOnSizeOfAlignOfExpr(SourceLocation OpLoc, bool isSizeof, bool isType, | 
|  | 547 | void *TyOrEx, const SourceRange &ArgRange) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 548 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | 0eb2330 | 2009-01-19 00:08:26 +0000 | [diff] [blame] | 549 | return ExprEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 550 | } | 
| Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 551 |  | 
|  | 552 | virtual OwningExprResult ActOnCompoundLiteral(SourceLocation LParen, | 
|  | 553 | TypeTy *Ty, | 
|  | 554 | SourceLocation RParen, | 
|  | 555 | ExprArg Op) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 556 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 557 | return ExprEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 558 | } | 
| Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 559 | virtual OwningExprResult ActOnInitList(SourceLocation LParenLoc, | 
|  | 560 | MultiExprArg InitList, | 
| Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 561 | SourceLocation RParenLoc) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 562 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 563 | return ExprEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 564 | } | 
| Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 565 | virtual OwningExprResult ActOnCastExpr(SourceLocation LParenLoc, TypeTy *Ty, | 
|  | 566 | SourceLocation RParenLoc,ExprArg Op){ | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 567 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 568 | return ExprEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 569 | } | 
| Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 570 |  | 
|  | 571 | virtual OwningExprResult ActOnBinOp(Scope *S, SourceLocation TokLoc, | 
|  | 572 | tok::TokenKind Kind, | 
|  | 573 | ExprArg LHS, ExprArg RHS) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 574 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 575 | return ExprEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 576 | } | 
|  | 577 |  | 
|  | 578 | /// ActOnConditionalOp - Parse a ?: operation.  Note that 'LHS' may be null | 
|  | 579 | /// in the case of a the GNU conditional expr extension. | 
| Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 580 | virtual OwningExprResult ActOnConditionalOp(SourceLocation QuestionLoc, | 
|  | 581 | SourceLocation ColonLoc, | 
|  | 582 | ExprArg Cond, ExprArg LHS, | 
|  | 583 | ExprArg RHS) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 584 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 585 | return ExprEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 586 | } | 
| Sebastian Redl | b8a6aca | 2009-01-19 22:31:54 +0000 | [diff] [blame] | 587 |  | 
|  | 588 | //===--------------------- GNU Extension Expressions ------------------===// | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 589 |  | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 590 | virtual OwningExprResult ActOnAddrLabel(SourceLocation OpLoc, | 
|  | 591 | SourceLocation LabLoc, | 
|  | 592 | IdentifierInfo *LabelII) {// "&&foo" | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 593 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 594 | return ExprEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 595 | } | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 596 |  | 
|  | 597 | virtual OwningExprResult ActOnStmtExpr(SourceLocation LPLoc, | 
|  | 598 | StmtArg SubStmt, | 
|  | 599 | SourceLocation RPLoc) { // "({..})" | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 600 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 601 | return ExprEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 602 | } | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 603 |  | 
|  | 604 | virtual OwningExprResult ActOnBuiltinOffsetOf(Scope *S, | 
|  | 605 | SourceLocation BuiltinLoc, | 
|  | 606 | SourceLocation TypeLoc, | 
|  | 607 | TypeTy *Arg1, | 
|  | 608 | OffsetOfComponent *CompPtr, | 
|  | 609 | unsigned NumComponents, | 
|  | 610 | SourceLocation RParenLoc) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 611 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 612 | return ExprEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 613 | } | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 614 |  | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 615 | // __builtin_types_compatible_p(type1, type2) | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 616 | virtual OwningExprResult ActOnTypesCompatibleExpr(SourceLocation BuiltinLoc, | 
|  | 617 | TypeTy *arg1,TypeTy *arg2, | 
|  | 618 | SourceLocation RPLoc) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 619 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 620 | return ExprEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 621 | } | 
|  | 622 | // __builtin_choose_expr(constExpr, expr1, expr2) | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 623 | virtual OwningExprResult ActOnChooseExpr(SourceLocation BuiltinLoc, | 
|  | 624 | ExprArg cond, ExprArg expr1, | 
|  | 625 | ExprArg expr2, | 
|  | 626 | SourceLocation RPLoc) { | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 627 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 628 | return ExprEmpty(); | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 629 | } | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 630 |  | 
|  | 631 | // __builtin_va_arg(expr, type) | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 632 | virtual OwningExprResult ActOnVAArg(SourceLocation BuiltinLoc, | 
|  | 633 | ExprArg expr, TypeTy *type, | 
| Daniel Dunbar | bb8f4e6 | 2008-08-01 00:41:12 +0000 | [diff] [blame] | 634 | SourceLocation RPLoc) { | 
|  | 635 | llvm::cout << __FUNCTION__ << "\n"; | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 636 | return ExprEmpty(); | 
|  | 637 | } | 
|  | 638 |  | 
|  | 639 | virtual OwningExprResult ActOnGNUNullExpr(SourceLocation TokenLoc) { | 
|  | 640 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 641 | return ExprEmpty(); | 
|  | 642 | } | 
|  | 643 |  | 
|  | 644 | virtual void ActOnBlockStart(SourceLocation CaretLoc, Scope *CurScope) { | 
|  | 645 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 646 | } | 
|  | 647 |  | 
|  | 648 | virtual void ActOnBlockArguments(Declarator &ParamInfo, Scope *CurScope) { | 
|  | 649 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 650 | } | 
|  | 651 |  | 
|  | 652 | virtual void ActOnBlockError(SourceLocation CaretLoc, Scope *CurScope) { | 
|  | 653 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 654 | } | 
|  | 655 |  | 
|  | 656 | virtual OwningExprResult ActOnBlockStmtExpr(SourceLocation CaretLoc, | 
|  | 657 | StmtArg Body, | 
|  | 658 | Scope *CurScope) { | 
|  | 659 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 660 | return ExprEmpty(); | 
|  | 661 | } | 
|  | 662 |  | 
| Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 663 | virtual DeclPtrTy ActOnStartNamespaceDef(Scope *S, SourceLocation IdentLoc, | 
|  | 664 | IdentifierInfo *Ident, | 
|  | 665 | SourceLocation LBrace) { | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 666 | llvm::cout << __FUNCTION__ << "\n"; | 
| Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 667 | return DeclPtrTy(); | 
| Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 668 | } | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 669 |  | 
| Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 670 | virtual void ActOnFinishNamespaceDef(DeclPtrTy Dcl, SourceLocation RBrace) { | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 671 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 672 | return; | 
|  | 673 | } | 
|  | 674 |  | 
|  | 675 | #if 0 | 
|  | 676 | // FIXME: AttrList should be deleted by this function, but the definition | 
|  | 677 | // would have to be available. | 
| Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 678 | virtual DeclPtrTy ActOnUsingDirective(Scope *CurScope, | 
|  | 679 | SourceLocation UsingLoc, | 
|  | 680 | SourceLocation NamespcLoc, | 
|  | 681 | const CXXScopeSpec &SS, | 
|  | 682 | SourceLocation IdentLoc, | 
|  | 683 | IdentifierInfo *NamespcName, | 
|  | 684 | AttributeList *AttrList) { | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 685 | llvm::cout << __FUNCTION__ << "\n"; | 
| Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 686 | return DeclPtrTy(); | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 687 | } | 
|  | 688 | #endif | 
|  | 689 |  | 
| Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 690 | virtual void ActOnParamDefaultArgument(DeclPtrTy param, | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 691 | SourceLocation EqualLoc, | 
|  | 692 | ExprArg defarg) { | 
|  | 693 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 694 | } | 
|  | 695 |  | 
| Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 696 | virtual void ActOnParamUnparsedDefaultArgument(DeclPtrTy param, | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 697 | SourceLocation EqualLoc) { | 
|  | 698 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 699 | } | 
|  | 700 |  | 
| Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 701 | virtual void ActOnParamDefaultArgumentError(DeclPtrTy param) { | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 702 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 703 | } | 
|  | 704 |  | 
| Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 705 | virtual void AddCXXDirectInitializerToDecl(DeclPtrTy Dcl, | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 706 | SourceLocation LParenLoc, | 
|  | 707 | MultiExprArg Exprs, | 
|  | 708 | SourceLocation *CommaLocs, | 
|  | 709 | SourceLocation RParenLoc) { | 
|  | 710 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 711 | return; | 
|  | 712 | } | 
|  | 713 |  | 
| Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 714 | virtual void ActOnStartDelayedCXXMethodDeclaration(Scope *S, | 
|  | 715 | DeclPtrTy Method) | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 716 | { | 
|  | 717 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 718 | } | 
|  | 719 |  | 
| Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 720 | virtual void ActOnDelayedCXXMethodParameter(Scope *S, DeclPtrTy Param) { | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 721 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 722 | } | 
|  | 723 |  | 
|  | 724 | virtual void ActOnFinishDelayedCXXMethodDeclaration(Scope *S, | 
| Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 725 | DeclPtrTy Method) { | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 726 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 727 | } | 
|  | 728 |  | 
| Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 729 | virtual DeclPtrTy ActOnStaticAssertDeclaration(SourceLocation AssertLoc, | 
|  | 730 | ExprArg AssertExpr, | 
|  | 731 | ExprArg AssertMessageExpr) { | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 732 | llvm::cout << __FUNCTION__ << "\n"; | 
| Chris Lattner | b28317a | 2009-03-28 19:18:32 +0000 | [diff] [blame] | 733 | return DeclPtrTy(); | 
| Sebastian Redl | f53597f | 2009-03-15 17:47:39 +0000 | [diff] [blame] | 734 | } | 
|  | 735 |  | 
|  | 736 | virtual OwningExprResult ActOnCXXNamedCast(SourceLocation OpLoc, | 
|  | 737 | tok::TokenKind Kind, | 
|  | 738 | SourceLocation LAngleBracketLoc, | 
|  | 739 | TypeTy *Ty, | 
|  | 740 | SourceLocation RAngleBracketLoc, | 
|  | 741 | SourceLocation LParenLoc, | 
|  | 742 | ExprArg Op, | 
|  | 743 | SourceLocation RParenLoc) { | 
|  | 744 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 745 | return ExprEmpty(); | 
|  | 746 | } | 
|  | 747 |  | 
|  | 748 | virtual OwningExprResult ActOnCXXTypeid(SourceLocation OpLoc, | 
|  | 749 | SourceLocation LParenLoc, | 
|  | 750 | bool isType, void *TyOrExpr, | 
|  | 751 | SourceLocation RParenLoc) { | 
|  | 752 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 753 | return ExprEmpty(); | 
|  | 754 | } | 
|  | 755 |  | 
|  | 756 | virtual OwningExprResult ActOnCXXThis(SourceLocation ThisLoc) { | 
|  | 757 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 758 | return ExprEmpty(); | 
|  | 759 | } | 
|  | 760 |  | 
|  | 761 | virtual OwningExprResult ActOnCXXBoolLiteral(SourceLocation OpLoc, | 
|  | 762 | tok::TokenKind Kind) { | 
|  | 763 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 764 | return ExprEmpty(); | 
|  | 765 | } | 
|  | 766 |  | 
|  | 767 | virtual OwningExprResult ActOnCXXThrow(SourceLocation OpLoc, ExprArg Op) { | 
|  | 768 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 769 | return ExprEmpty(); | 
|  | 770 | } | 
|  | 771 |  | 
|  | 772 | virtual OwningExprResult ActOnCXXTypeConstructExpr(SourceRange TypeRange, | 
|  | 773 | TypeTy *TypeRep, | 
|  | 774 | SourceLocation LParenLoc, | 
|  | 775 | MultiExprArg Exprs, | 
|  | 776 | SourceLocation *CommaLocs, | 
|  | 777 | SourceLocation RParenLoc) { | 
|  | 778 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 779 | return ExprEmpty(); | 
|  | 780 | } | 
|  | 781 |  | 
|  | 782 | virtual OwningExprResult ActOnCXXConditionDeclarationExpr(Scope *S, | 
|  | 783 | SourceLocation StartLoc, | 
|  | 784 | Declarator &D, | 
|  | 785 | SourceLocation EqualLoc, | 
|  | 786 | ExprArg AssignExprVal) { | 
|  | 787 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 788 | return ExprEmpty(); | 
|  | 789 | } | 
|  | 790 |  | 
|  | 791 | virtual OwningExprResult ActOnCXXNew(SourceLocation StartLoc, | 
|  | 792 | bool UseGlobal, | 
|  | 793 | SourceLocation PlacementLParen, | 
|  | 794 | MultiExprArg PlacementArgs, | 
|  | 795 | SourceLocation PlacementRParen, | 
|  | 796 | bool ParenTypeId, Declarator &D, | 
|  | 797 | SourceLocation ConstructorLParen, | 
|  | 798 | MultiExprArg ConstructorArgs, | 
|  | 799 | SourceLocation ConstructorRParen) { | 
|  | 800 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 801 | return ExprEmpty(); | 
|  | 802 | } | 
|  | 803 |  | 
|  | 804 | virtual OwningExprResult ActOnCXXDelete(SourceLocation StartLoc, | 
|  | 805 | bool UseGlobal, bool ArrayForm, | 
|  | 806 | ExprArg Operand) { | 
|  | 807 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 808 | return ExprEmpty(); | 
|  | 809 | } | 
|  | 810 |  | 
|  | 811 | virtual OwningExprResult ActOnUnaryTypeTrait(UnaryTypeTrait OTT, | 
|  | 812 | SourceLocation KWLoc, | 
|  | 813 | SourceLocation LParen, | 
|  | 814 | TypeTy *Ty, | 
|  | 815 | SourceLocation RParen) { | 
|  | 816 | llvm::cout << __FUNCTION__ << "\n"; | 
|  | 817 | return ExprEmpty(); | 
|  | 818 | } | 
| Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 819 | }; | 
|  | 820 | } | 
|  | 821 |  | 
| Daniel Dunbar | e10b0f2 | 2008-10-31 08:56:51 +0000 | [diff] [blame] | 822 | MinimalAction *clang::CreatePrintParserActionsAction(Preprocessor &PP) { | 
|  | 823 | return new ParserPrintActions(PP); | 
| Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 824 | } |