1 //===--- PrintParserActions.cpp - Implement -parse-print-callbacks mode ---===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
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.
13 //===----------------------------------------------------------------------===//
15 #include "clang/Frontend/Utils.h"
16 #include "clang/Parse/Action.h"
17 #include "clang/Parse/DeclSpec.h"
18 #include "llvm/Support/raw_ostream.h"
19 using namespace clang;
22 class ParserPrintActions : public MinimalAction {
23 llvm::raw_ostream& Out;
26 ParserPrintActions(Preprocessor &PP, llvm::raw_ostream& OS)
27 : MinimalAction(PP), Out(OS) {}
29 // Printing Functions which also must call MinimalAction
31 /// ActOnDeclarator - This callback is invoked when a declarator is parsed
32 /// and 'Init' specifies the initializer if any. This is for things like:
33 /// "int X = 4" or "typedef int foo".
34 virtual DeclPtrTy ActOnDeclarator(Scope *S, Declarator &D) {
35 Out << __FUNCTION__ << " ";
36 if (IdentifierInfo *II = D.getIdentifier()) {
37 Out << "'" << II->getName() << "'";
43 // Pass up to EmptyActions so that the symbol table is maintained right.
44 return MinimalAction::ActOnDeclarator(S, D);
46 /// ActOnPopScope - This callback is called immediately before the specified
47 /// scope is popped and deleted.
48 virtual void ActOnPopScope(SourceLocation Loc, Scope *S) {
49 Out << __FUNCTION__ << "\n";
50 return MinimalAction::ActOnPopScope(Loc, S);
53 /// ActOnTranslationUnitScope - This callback is called once, immediately
54 /// after creating the translation unit scope (in Parser::Initialize).
55 virtual void ActOnTranslationUnitScope(SourceLocation Loc, Scope *S) {
56 Out << __FUNCTION__ << "\n";
57 MinimalAction::ActOnTranslationUnitScope(Loc, S);
61 Action::DeclPtrTy ActOnStartClassInterface(SourceLocation AtInterfaceLoc,
62 IdentifierInfo *ClassName,
63 SourceLocation ClassLoc,
64 IdentifierInfo *SuperName,
65 SourceLocation SuperLoc,
66 const DeclPtrTy *ProtoRefs,
67 unsigned NumProtocols,
68 const SourceLocation *ProtoLocs,
69 SourceLocation EndProtoLoc,
70 AttributeList *AttrList) {
71 Out << __FUNCTION__ << "\n";
72 return MinimalAction::ActOnStartClassInterface(AtInterfaceLoc,
75 ProtoRefs, NumProtocols,
76 ProtoLocs, EndProtoLoc,
80 /// ActOnForwardClassDeclaration -
81 /// Scope will always be top level file scope.
82 Action::DeclPtrTy ActOnForwardClassDeclaration(SourceLocation AtClassLoc,
83 IdentifierInfo **IdentList,
84 SourceLocation *IdentLocs,
86 Out << __FUNCTION__ << "\n";
87 return MinimalAction::ActOnForwardClassDeclaration(AtClassLoc, IdentList,
93 /// ActOnParamDeclarator - This callback is invoked when a parameter
94 /// declarator is parsed. This callback only occurs for functions
95 /// with prototypes. S is the function prototype scope for the
96 /// parameters (C++ [basic.scope.proto]).
97 virtual DeclPtrTy ActOnParamDeclarator(Scope *S, Declarator &D) {
98 Out << __FUNCTION__ << " ";
99 if (IdentifierInfo *II = D.getIdentifier()) {
100 Out << "'" << II->getName() << "'";
108 /// AddInitializerToDecl - This action is called immediately after
109 /// ParseDeclarator (when an initializer is present). The code is factored
110 /// this way to make sure we are able to handle the following:
111 /// void func() { int xx = xx; }
112 /// This allows ActOnDeclarator to register "xx" prior to parsing the
113 /// initializer. The declaration above should still result in a warning,
114 /// since the reference to "xx" is uninitialized.
115 virtual void AddInitializerToDecl(DeclPtrTy Dcl, ExprArg Init) {
116 Out << __FUNCTION__ << "\n";
119 /// FinalizeDeclaratorGroup - After a sequence of declarators are parsed,
120 /// this gives the actions implementation a chance to process the group as
122 virtual DeclGroupPtrTy FinalizeDeclaratorGroup(Scope *S, const DeclSpec& DS,
125 Out << __FUNCTION__ << "\n";
126 return DeclGroupPtrTy();
129 /// ActOnStartOfFunctionDef - This is called at the start of a function
130 /// definition, instead of calling ActOnDeclarator. The Declarator includes
131 /// information about formal arguments that are part of this function.
132 virtual DeclPtrTy ActOnStartOfFunctionDef(Scope *FnBodyScope,
134 Out << __FUNCTION__ << "\n";
138 /// ActOnStartOfFunctionDef - This is called at the start of a function
139 /// definition, after the FunctionDecl has already been created.
140 virtual DeclPtrTy ActOnStartOfFunctionDef(Scope *FnBodyScope, DeclPtrTy D) {
141 Out << __FUNCTION__ << "\n";
145 virtual void ActOnStartOfObjCMethodDef(Scope *FnBodyScope, DeclPtrTy D) {
146 Out << __FUNCTION__ << "\n";
149 /// ActOnFunctionDefBody - This is called when a function body has completed
150 /// parsing. Decl is the DeclTy returned by ParseStartOfFunctionDef.
151 virtual DeclPtrTy ActOnFinishFunctionBody(DeclPtrTy Decl, StmtArg Body) {
152 Out << __FUNCTION__ << "\n";
156 virtual DeclPtrTy ActOnFileScopeAsmDecl(SourceLocation Loc,
158 Out << __FUNCTION__ << "\n";
162 /// ParsedFreeStandingDeclSpec - This method is invoked when a declspec with
163 /// no declarator (e.g. "struct foo;") is parsed.
164 virtual DeclPtrTy ParsedFreeStandingDeclSpec(Scope *S, DeclSpec &DS) {
165 Out << __FUNCTION__ << "\n";
169 /// ActOnLinkageSpec - Parsed a C++ linkage-specification that
170 /// contained braces. Lang/StrSize contains the language string that
171 /// was parsed at location Loc. Decls/NumDecls provides the
172 /// declarations parsed inside the linkage specification.
173 virtual DeclPtrTy ActOnLinkageSpec(SourceLocation Loc,
174 SourceLocation LBrace,
175 SourceLocation RBrace, const char *Lang,
177 DeclPtrTy *Decls, unsigned NumDecls) {
178 Out << __FUNCTION__ << "\n";
182 /// ActOnLinkageSpec - Parsed a C++ linkage-specification without
183 /// braces. Lang/StrSize contains the language string that was
184 /// parsed at location Loc. D is the declaration parsed.
185 virtual DeclPtrTy ActOnLinkageSpec(SourceLocation Loc, const char *Lang,
186 unsigned StrSize, DeclPtrTy D) {
190 //===------------------------------------------------------------------===//
191 // Type Parsing Callbacks.
192 //===------------------------------------------------------------------===//
194 virtual TypeResult ActOnTypeName(Scope *S, Declarator &D) {
195 Out << __FUNCTION__ << "\n";
199 virtual DeclPtrTy ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK,
200 SourceLocation KWLoc, const CXXScopeSpec &SS,
201 IdentifierInfo *Name, SourceLocation NameLoc,
202 AttributeList *Attr, AccessSpecifier AS,
203 MultiTemplateParamsArg TemplateParameterLists,
204 bool &OwnedDecl, bool &IsDependent) {
205 // TagType is an instance of DeclSpec::TST, indicating what kind of tag this
206 // is (struct/union/enum/class).
207 Out << __FUNCTION__ << "\n";
211 /// Act on @defs() element found when parsing a structure. ClassName is the
212 /// name of the referenced class.
213 virtual void ActOnDefs(Scope *S, DeclPtrTy TagD, SourceLocation DeclStart,
214 IdentifierInfo *ClassName,
215 llvm::SmallVectorImpl<DeclPtrTy> &Decls) {
216 Out << __FUNCTION__ << "\n";
219 virtual DeclPtrTy ActOnField(Scope *S, DeclPtrTy TagD,
220 SourceLocation DeclStart,
221 Declarator &D, ExprTy *BitfieldWidth) {
222 Out << __FUNCTION__ << "\n";
226 virtual DeclPtrTy ActOnIvar(Scope *S, SourceLocation DeclStart,
228 Declarator &D, ExprTy *BitfieldWidth,
229 tok::ObjCKeywordKind visibility) {
230 Out << __FUNCTION__ << "\n";
234 virtual void ActOnFields(Scope* S, SourceLocation RecLoc, DeclPtrTy TagDecl,
235 DeclPtrTy *Fields, unsigned NumFields,
236 SourceLocation LBrac, SourceLocation RBrac,
237 AttributeList *AttrList) {
238 Out << __FUNCTION__ << "\n";
241 virtual DeclPtrTy ActOnEnumConstant(Scope *S, DeclPtrTy EnumDecl,
242 DeclPtrTy LastEnumConstant,
243 SourceLocation IdLoc,IdentifierInfo *Id,
244 SourceLocation EqualLoc, ExprTy *Val) {
245 Out << __FUNCTION__ << "\n";
249 virtual void ActOnEnumBody(SourceLocation EnumLoc, SourceLocation LBraceLoc,
250 SourceLocation RBraceLoc, DeclPtrTy EnumDecl,
251 DeclPtrTy *Elements, unsigned NumElements,
252 Scope *S, AttributeList *AttrList) {
253 Out << __FUNCTION__ << "\n";
256 //===------------------------------------------------------------------===//
257 // Statement Parsing Callbacks.
258 //===------------------------------------------------------------------===//
260 virtual OwningStmtResult ActOnNullStmt(SourceLocation SemiLoc) {
261 Out << __FUNCTION__ << "\n";
265 virtual OwningStmtResult ActOnCompoundStmt(SourceLocation L,
269 Out << __FUNCTION__ << "\n";
272 virtual OwningStmtResult ActOnDeclStmt(DeclGroupPtrTy Decl,
273 SourceLocation StartLoc,
274 SourceLocation EndLoc) {
275 Out << __FUNCTION__ << "\n";
279 virtual OwningStmtResult ActOnExprStmt(FullExprArg Expr) {
280 Out << __FUNCTION__ << "\n";
281 return OwningStmtResult(*this, Expr->release());
284 /// ActOnCaseStmt - Note that this handles the GNU 'case 1 ... 4' extension,
285 /// which can specify an RHS value.
286 virtual OwningStmtResult ActOnCaseStmt(SourceLocation CaseLoc,
288 SourceLocation DotDotDotLoc,
290 SourceLocation ColonLoc) {
291 Out << __FUNCTION__ << "\n";
294 virtual OwningStmtResult ActOnDefaultStmt(SourceLocation DefaultLoc,
295 SourceLocation ColonLoc,
296 StmtArg SubStmt, Scope *CurScope){
297 Out << __FUNCTION__ << "\n";
301 virtual OwningStmtResult ActOnLabelStmt(SourceLocation IdentLoc,
303 SourceLocation ColonLoc,
305 Out << __FUNCTION__ << "\n";
309 virtual OwningStmtResult ActOnIfStmt(SourceLocation IfLoc,
310 FullExprArg CondVal, DeclPtrTy CondVar,
312 SourceLocation ElseLoc,
314 Out << __FUNCTION__ << "\n";
318 virtual OwningStmtResult ActOnStartOfSwitchStmt(FullExprArg Cond,
320 Out << __FUNCTION__ << "\n";
324 virtual OwningStmtResult ActOnFinishSwitchStmt(SourceLocation SwitchLoc,
327 Out << __FUNCTION__ << "\n";
331 virtual OwningStmtResult ActOnWhileStmt(SourceLocation WhileLoc,
332 FullExprArg Cond, DeclPtrTy CondVar,
334 Out << __FUNCTION__ << "\n";
337 virtual OwningStmtResult ActOnDoStmt(SourceLocation DoLoc, StmtArg Body,
338 SourceLocation WhileLoc,
339 SourceLocation LPLoc, ExprArg Cond,
340 SourceLocation RPLoc){
341 Out << __FUNCTION__ << "\n";
344 virtual OwningStmtResult ActOnForStmt(SourceLocation ForLoc,
345 SourceLocation LParenLoc,
346 StmtArg First, FullExprArg Second,
349 SourceLocation RParenLoc,
351 Out << __FUNCTION__ << "\n";
354 virtual OwningStmtResult ActOnObjCForCollectionStmt(
355 SourceLocation ForColLoc,
356 SourceLocation LParenLoc,
357 StmtArg First, ExprArg Second,
358 SourceLocation RParenLoc, StmtArg Body) {
359 Out << __FUNCTION__ << "\n";
362 virtual OwningStmtResult ActOnGotoStmt(SourceLocation GotoLoc,
363 SourceLocation LabelLoc,
364 IdentifierInfo *LabelII) {
365 Out << __FUNCTION__ << "\n";
368 virtual OwningStmtResult ActOnIndirectGotoStmt(SourceLocation GotoLoc,
369 SourceLocation StarLoc,
371 Out << __FUNCTION__ << "\n";
374 virtual OwningStmtResult ActOnContinueStmt(SourceLocation ContinueLoc,
376 Out << __FUNCTION__ << "\n";
379 virtual OwningStmtResult ActOnBreakStmt(SourceLocation GotoLoc,
381 Out << __FUNCTION__ << "\n";
384 virtual OwningStmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
386 Out << __FUNCTION__ << "\n";
389 virtual OwningStmtResult ActOnAsmStmt(SourceLocation AsmLoc,
395 MultiExprArg Constraints,
398 MultiExprArg Clobbers,
399 SourceLocation RParenLoc,
401 Out << __FUNCTION__ << "\n";
405 // Objective-c statements
406 virtual OwningStmtResult ActOnObjCAtCatchStmt(SourceLocation AtLoc,
407 SourceLocation RParen,
408 DeclPtrTy Parm, StmtArg Body,
410 Out << __FUNCTION__ << "\n";
414 virtual OwningStmtResult ActOnObjCAtFinallyStmt(SourceLocation AtLoc,
416 Out << __FUNCTION__ << "\n";
420 virtual OwningStmtResult ActOnObjCAtTryStmt(SourceLocation AtLoc,
421 StmtArg Try, StmtArg Catch,
423 Out << __FUNCTION__ << "\n";
427 virtual OwningStmtResult ActOnObjCAtThrowStmt(SourceLocation AtLoc,
430 Out << __FUNCTION__ << "\n";
434 virtual OwningStmtResult ActOnObjCAtSynchronizedStmt(SourceLocation AtLoc,
437 Out << __FUNCTION__ << "\n";
442 virtual DeclPtrTy ActOnExceptionDeclarator(Scope *S, Declarator &D) {
443 Out << __FUNCTION__ << "\n";
447 virtual OwningStmtResult ActOnCXXCatchBlock(SourceLocation CatchLoc,
448 DeclPtrTy ExceptionDecl,
449 StmtArg HandlerBlock) {
450 Out << __FUNCTION__ << "\n";
454 virtual OwningStmtResult ActOnCXXTryBlock(SourceLocation TryLoc,
456 MultiStmtArg Handlers) {
457 Out << __FUNCTION__ << "\n";
461 //===------------------------------------------------------------------===//
462 // Expression Parsing Callbacks.
463 //===------------------------------------------------------------------===//
465 // Primary Expressions.
467 /// ActOnIdentifierExpr - Parse an identifier in expression context.
468 /// 'HasTrailingLParen' indicates whether or not the identifier has a '('
469 /// token immediately after it.
470 virtual OwningExprResult ActOnIdentifierExpr(Scope *S, SourceLocation Loc,
472 bool HasTrailingLParen,
473 const CXXScopeSpec *SS,
474 bool isAddressOfOperand) {
475 Out << __FUNCTION__ << "\n";
479 virtual OwningExprResult ActOnCXXOperatorFunctionIdExpr(
480 Scope *S, SourceLocation OperatorLoc,
481 OverloadedOperatorKind Op,
482 bool HasTrailingLParen, const CXXScopeSpec &SS,
483 bool isAddressOfOperand) {
484 Out << __FUNCTION__ << "\n";
488 virtual OwningExprResult ActOnCXXConversionFunctionExpr(
489 Scope *S, SourceLocation OperatorLoc,
490 TypeTy *Type, bool HasTrailingLParen,
491 const CXXScopeSpec &SS,bool isAddressOfOperand) {
492 Out << __FUNCTION__ << "\n";
496 virtual OwningExprResult ActOnPredefinedExpr(SourceLocation Loc,
497 tok::TokenKind Kind) {
498 Out << __FUNCTION__ << "\n";
502 virtual OwningExprResult ActOnCharacterConstant(const Token &) {
503 Out << __FUNCTION__ << "\n";
507 virtual OwningExprResult ActOnNumericConstant(const Token &) {
508 Out << __FUNCTION__ << "\n";
512 /// ActOnStringLiteral - The specified tokens were lexed as pasted string
513 /// fragments (e.g. "foo" "bar" L"baz").
514 virtual OwningExprResult ActOnStringLiteral(const Token *Toks,
516 Out << __FUNCTION__ << "\n";
520 virtual OwningExprResult ActOnParenExpr(SourceLocation L, SourceLocation R,
522 Out << __FUNCTION__ << "\n";
523 return move(Val); // Default impl returns operand.
526 // Postfix Expressions.
527 virtual OwningExprResult ActOnPostfixUnaryOp(Scope *S, SourceLocation OpLoc,
530 Out << __FUNCTION__ << "\n";
533 virtual OwningExprResult ActOnArraySubscriptExpr(Scope *S, ExprArg Base,
536 SourceLocation RLoc) {
537 Out << __FUNCTION__ << "\n";
540 virtual OwningExprResult ActOnMemberReferenceExpr(Scope *S, ExprArg Base,
541 SourceLocation OpLoc,
542 tok::TokenKind OpKind,
543 SourceLocation MemberLoc,
544 IdentifierInfo &Member,
546 const CXXScopeSpec *SS=0) {
547 Out << __FUNCTION__ << "\n";
551 virtual OwningExprResult ActOnCallExpr(Scope *S, ExprArg Fn,
552 SourceLocation LParenLoc,
554 SourceLocation *CommaLocs,
555 SourceLocation RParenLoc) {
556 Out << __FUNCTION__ << "\n";
560 // Unary Operators. 'Tok' is the token for the operator.
561 virtual OwningExprResult ActOnUnaryOp(Scope *S, SourceLocation OpLoc,
562 tok::TokenKind Op, ExprArg Input) {
563 Out << __FUNCTION__ << "\n";
566 virtual OwningExprResult
567 ActOnSizeOfAlignOfExpr(SourceLocation OpLoc, bool isSizeof, bool isType,
568 void *TyOrEx, const SourceRange &ArgRange) {
569 Out << __FUNCTION__ << "\n";
573 virtual OwningExprResult ActOnCompoundLiteral(SourceLocation LParen,
575 SourceLocation RParen,
577 Out << __FUNCTION__ << "\n";
580 virtual OwningExprResult ActOnInitList(SourceLocation LParenLoc,
581 MultiExprArg InitList,
582 SourceLocation RParenLoc) {
583 Out << __FUNCTION__ << "\n";
586 virtual OwningExprResult ActOnCastExpr(Scope *S, SourceLocation LParenLoc,
587 TypeTy *Ty, SourceLocation RParenLoc,
589 Out << __FUNCTION__ << "\n";
593 virtual OwningExprResult ActOnBinOp(Scope *S, SourceLocation TokLoc,
595 ExprArg LHS, ExprArg RHS) {
596 Out << __FUNCTION__ << "\n";
600 /// ActOnConditionalOp - Parse a ?: operation. Note that 'LHS' may be null
601 /// in the case of a the GNU conditional expr extension.
602 virtual OwningExprResult ActOnConditionalOp(SourceLocation QuestionLoc,
603 SourceLocation ColonLoc,
604 ExprArg Cond, ExprArg LHS,
606 Out << __FUNCTION__ << "\n";
610 //===--------------------- GNU Extension Expressions ------------------===//
612 virtual OwningExprResult ActOnAddrLabel(SourceLocation OpLoc,
613 SourceLocation LabLoc,
614 IdentifierInfo *LabelII) {// "&&foo"
615 Out << __FUNCTION__ << "\n";
619 virtual OwningExprResult ActOnStmtExpr(SourceLocation LPLoc,
621 SourceLocation RPLoc) { // "({..})"
622 Out << __FUNCTION__ << "\n";
626 virtual OwningExprResult ActOnBuiltinOffsetOf(Scope *S,
627 SourceLocation BuiltinLoc,
628 SourceLocation TypeLoc,
630 OffsetOfComponent *CompPtr,
631 unsigned NumComponents,
632 SourceLocation RParenLoc) {
633 Out << __FUNCTION__ << "\n";
637 // __builtin_types_compatible_p(type1, type2)
638 virtual OwningExprResult ActOnTypesCompatibleExpr(SourceLocation BuiltinLoc,
639 TypeTy *arg1,TypeTy *arg2,
640 SourceLocation RPLoc) {
641 Out << __FUNCTION__ << "\n";
644 // __builtin_choose_expr(constExpr, expr1, expr2)
645 virtual OwningExprResult ActOnChooseExpr(SourceLocation BuiltinLoc,
646 ExprArg cond, ExprArg expr1,
648 SourceLocation RPLoc) {
649 Out << __FUNCTION__ << "\n";
653 // __builtin_va_arg(expr, type)
654 virtual OwningExprResult ActOnVAArg(SourceLocation BuiltinLoc,
655 ExprArg expr, TypeTy *type,
656 SourceLocation RPLoc) {
657 Out << __FUNCTION__ << "\n";
661 virtual OwningExprResult ActOnGNUNullExpr(SourceLocation TokenLoc) {
662 Out << __FUNCTION__ << "\n";
666 virtual void ActOnBlockStart(SourceLocation CaretLoc, Scope *CurScope) {
667 Out << __FUNCTION__ << "\n";
670 virtual void ActOnBlockArguments(Declarator &ParamInfo, Scope *CurScope) {
671 Out << __FUNCTION__ << "\n";
674 virtual void ActOnBlockError(SourceLocation CaretLoc, Scope *CurScope) {
675 Out << __FUNCTION__ << "\n";
678 virtual OwningExprResult ActOnBlockStmtExpr(SourceLocation CaretLoc,
681 Out << __FUNCTION__ << "\n";
685 virtual DeclPtrTy ActOnStartNamespaceDef(Scope *S, SourceLocation IdentLoc,
686 IdentifierInfo *Ident,
687 SourceLocation LBrace) {
688 Out << __FUNCTION__ << "\n";
692 virtual void ActOnFinishNamespaceDef(DeclPtrTy Dcl, SourceLocation RBrace) {
693 Out << __FUNCTION__ << "\n";
698 // FIXME: AttrList should be deleted by this function, but the definition
699 // would have to be available.
700 virtual DeclPtrTy ActOnUsingDirective(Scope *CurScope,
701 SourceLocation UsingLoc,
702 SourceLocation NamespcLoc,
703 const CXXScopeSpec &SS,
704 SourceLocation IdentLoc,
705 IdentifierInfo *NamespcName,
706 AttributeList *AttrList) {
707 Out << __FUNCTION__ << "\n";
712 virtual void ActOnParamDefaultArgument(DeclPtrTy param,
713 SourceLocation EqualLoc,
715 Out << __FUNCTION__ << "\n";
718 virtual void ActOnParamUnparsedDefaultArgument(DeclPtrTy param,
719 SourceLocation EqualLoc,
720 SourceLocation ArgLoc) {
721 Out << __FUNCTION__ << "\n";
724 virtual void ActOnParamDefaultArgumentError(DeclPtrTy param) {
725 Out << __FUNCTION__ << "\n";
728 virtual void AddCXXDirectInitializerToDecl(DeclPtrTy Dcl,
729 SourceLocation LParenLoc,
731 SourceLocation *CommaLocs,
732 SourceLocation RParenLoc) {
733 Out << __FUNCTION__ << "\n";
737 virtual void ActOnStartDelayedCXXMethodDeclaration(Scope *S,
739 Out << __FUNCTION__ << "\n";
742 virtual void ActOnDelayedCXXMethodParameter(Scope *S, DeclPtrTy Param) {
743 Out << __FUNCTION__ << "\n";
746 virtual void ActOnFinishDelayedCXXMethodDeclaration(Scope *S,
748 Out << __FUNCTION__ << "\n";
751 virtual DeclPtrTy ActOnStaticAssertDeclaration(SourceLocation AssertLoc,
753 ExprArg AssertMessageExpr) {
754 Out << __FUNCTION__ << "\n";
758 virtual OwningExprResult ActOnCXXNamedCast(SourceLocation OpLoc,
760 SourceLocation LAngleBracketLoc,
762 SourceLocation RAngleBracketLoc,
763 SourceLocation LParenLoc,
765 SourceLocation RParenLoc) {
766 Out << __FUNCTION__ << "\n";
770 virtual OwningExprResult ActOnCXXTypeid(SourceLocation OpLoc,
771 SourceLocation LParenLoc,
772 bool isType, void *TyOrExpr,
773 SourceLocation RParenLoc) {
774 Out << __FUNCTION__ << "\n";
778 virtual OwningExprResult ActOnCXXThis(SourceLocation ThisLoc) {
779 Out << __FUNCTION__ << "\n";
783 virtual OwningExprResult ActOnCXXBoolLiteral(SourceLocation OpLoc,
784 tok::TokenKind Kind) {
785 Out << __FUNCTION__ << "\n";
789 virtual OwningExprResult ActOnCXXThrow(SourceLocation OpLoc, ExprArg Op) {
790 Out << __FUNCTION__ << "\n";
794 virtual OwningExprResult ActOnCXXTypeConstructExpr(SourceRange TypeRange,
796 SourceLocation LParenLoc,
798 SourceLocation *CommaLocs,
799 SourceLocation RParenLoc) {
800 Out << __FUNCTION__ << "\n";
804 virtual OwningExprResult ActOnCXXConditionDeclarationExpr(Scope *S,
805 SourceLocation StartLoc,
807 SourceLocation EqualLoc,
808 ExprArg AssignExprVal) {
809 Out << __FUNCTION__ << "\n";
813 virtual OwningExprResult ActOnCXXNew(SourceLocation StartLoc,
815 SourceLocation PlacementLParen,
816 MultiExprArg PlacementArgs,
817 SourceLocation PlacementRParen,
818 bool ParenTypeId, Declarator &D,
819 SourceLocation ConstructorLParen,
820 MultiExprArg ConstructorArgs,
821 SourceLocation ConstructorRParen) {
822 Out << __FUNCTION__ << "\n";
826 virtual OwningExprResult ActOnCXXDelete(SourceLocation StartLoc,
827 bool UseGlobal, bool ArrayForm,
829 Out << __FUNCTION__ << "\n";
833 virtual OwningExprResult ActOnUnaryTypeTrait(UnaryTypeTrait OTT,
834 SourceLocation KWLoc,
835 SourceLocation LParen,
837 SourceLocation RParen) {
838 Out << __FUNCTION__ << "\n";
844 MinimalAction *clang::CreatePrintParserActionsAction(Preprocessor &PP,
845 llvm::raw_ostream* OS) {
846 return new ParserPrintActions(PP, *OS);