mirror of https://github.com/mono/CppSharp.git
11 changed files with 5314 additions and 1485 deletions
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,541 @@ |
|||||||
|
/************************************************************************
|
||||||
|
* |
||||||
|
* CppSharp |
||||||
|
* Licensed under the simplified BSD license. All rights reserved. |
||||||
|
* |
||||||
|
************************************************************************/ |
||||||
|
|
||||||
|
#pragma once |
||||||
|
#include <llvm/Support/JSON.h> |
||||||
|
|
||||||
|
#include "ASTNameMangler.h" |
||||||
|
#include "Types.h" |
||||||
|
#include "clang/AST/ASTContext.h" |
||||||
|
#include "clang/AST/ASTDumperUtils.h" |
||||||
|
#include "clang/AST/ASTNodeTraverser.h" |
||||||
|
#include "clang/AST/RecursiveASTVisitor.h" |
||||||
|
#include "clang/AST/AttrVisitor.h" |
||||||
|
#include "clang/AST/CommentCommandTraits.h" |
||||||
|
#include "clang/AST/CommentVisitor.h" |
||||||
|
#include "clang/AST/ExprConcepts.h" |
||||||
|
#include "clang/AST/DeclCXX.h" |
||||||
|
#include "clang/AST/ExprCXX.h" |
||||||
|
#include "clang/AST/Type.h" |
||||||
|
|
||||||
|
#include <unordered_set> |
||||||
|
|
||||||
|
#include "Decl.h" |
||||||
|
#include "Expr.h" |
||||||
|
#include "Stmt.h" |
||||||
|
|
||||||
|
namespace CppSharp::CppParser { |
||||||
|
namespace AST { |
||||||
|
class Stmt; |
||||||
|
} // namespace AST
|
||||||
|
class Parser; |
||||||
|
|
||||||
|
class NodeStreamer |
||||||
|
{ |
||||||
|
bool FirstChild = true; |
||||||
|
bool TopLevel = true; |
||||||
|
llvm::SmallVector<std::function<void(bool IsLastChild)>, 32> Pending; |
||||||
|
|
||||||
|
protected: |
||||||
|
llvm::json::OStream JOS; |
||||||
|
|
||||||
|
public: |
||||||
|
/// Add a child of the current node. Calls DoAddChild without arguments
|
||||||
|
template <typename Fn> |
||||||
|
void AddChild(Fn DoAddChild) |
||||||
|
{ |
||||||
|
return AddChild("", DoAddChild); |
||||||
|
} |
||||||
|
|
||||||
|
/// Add a child of the current node with an optional label.
|
||||||
|
/// Calls DoAddChild without arguments.
|
||||||
|
template <typename Fn> |
||||||
|
void AddChild(llvm::StringRef Label, Fn DoAddChild) |
||||||
|
{ |
||||||
|
// If we're at the top level, there's nothing interesting to do; just
|
||||||
|
// run the dumper.
|
||||||
|
if (TopLevel) |
||||||
|
{ |
||||||
|
TopLevel = false; |
||||||
|
JOS.objectBegin(); |
||||||
|
|
||||||
|
DoAddChild(); |
||||||
|
|
||||||
|
while (!Pending.empty()) |
||||||
|
{ |
||||||
|
Pending.back()(true); |
||||||
|
Pending.pop_back(); |
||||||
|
} |
||||||
|
|
||||||
|
JOS.objectEnd(); |
||||||
|
TopLevel = true; |
||||||
|
return; |
||||||
|
} |
||||||
|
|
||||||
|
// We need to capture an owning-string in the lambda because the lambda
|
||||||
|
// is invoked in a deferred manner.
|
||||||
|
std::string LabelStr(!Label.empty() ? Label : "inner"); |
||||||
|
bool WasFirstChild = FirstChild; |
||||||
|
auto DumpWithIndent = [=](bool IsLastChild) |
||||||
|
{ |
||||||
|
if (WasFirstChild) |
||||||
|
{ |
||||||
|
JOS.attributeBegin(LabelStr); |
||||||
|
JOS.arrayBegin(); |
||||||
|
} |
||||||
|
|
||||||
|
FirstChild = true; |
||||||
|
unsigned Depth = Pending.size(); |
||||||
|
JOS.objectBegin(); |
||||||
|
|
||||||
|
DoAddChild(); |
||||||
|
|
||||||
|
// If any children are left, they're the last at their nesting level.
|
||||||
|
// Dump those ones out now.
|
||||||
|
while (Depth < Pending.size()) |
||||||
|
{ |
||||||
|
Pending.back()(true); |
||||||
|
this->Pending.pop_back(); |
||||||
|
} |
||||||
|
|
||||||
|
JOS.objectEnd(); |
||||||
|
|
||||||
|
if (IsLastChild) |
||||||
|
{ |
||||||
|
JOS.arrayEnd(); |
||||||
|
JOS.attributeEnd(); |
||||||
|
} |
||||||
|
}; |
||||||
|
|
||||||
|
if (FirstChild) |
||||||
|
{ |
||||||
|
Pending.push_back(std::move(DumpWithIndent)); |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
Pending.back()(false); |
||||||
|
Pending.back() = std::move(DumpWithIndent); |
||||||
|
} |
||||||
|
FirstChild = false; |
||||||
|
} |
||||||
|
|
||||||
|
NodeStreamer(llvm::raw_ostream& OS) |
||||||
|
: JOS(OS, 2) |
||||||
|
{ |
||||||
|
} |
||||||
|
}; |
||||||
|
|
||||||
|
// Dumps AST nodes in JSON format. There is no implied stability for the
|
||||||
|
// content or format of the dump between major releases of Clang, other than it
|
||||||
|
// being valid JSON output. Further, there is no requirement that the
|
||||||
|
// information dumped is a complete representation of the AST, only that the
|
||||||
|
// information presented is correct.
|
||||||
|
class ASTNodeVisitor |
||||||
|
: public clang::ConstAttrVisitor<ASTNodeVisitor>, |
||||||
|
public clang::comments::ConstCommentVisitor<ASTNodeVisitor, void, const clang::comments::FullComment*>, |
||||||
|
public clang::ConstTemplateArgumentVisitor<ASTNodeVisitor>, |
||||||
|
public clang::ConstStmtVisitor<ASTNodeVisitor>, |
||||||
|
public clang::TypeVisitor<ASTNodeVisitor>, |
||||||
|
public clang::ConstDeclVisitor<ASTNodeVisitor, AST::Declaration*>, |
||||||
|
public NodeStreamer |
||||||
|
{ |
||||||
|
friend class ASTNodeDumper; |
||||||
|
|
||||||
|
using InnerAttrVisitor = ConstAttrVisitor; |
||||||
|
using InnerCommentVisitor = ConstCommentVisitor; |
||||||
|
using InnerTemplateArgVisitor = ConstTemplateArgumentVisitor; |
||||||
|
using InnerStmtVisitor = ConstStmtVisitor; |
||||||
|
using InnerTypeVisitor = TypeVisitor; |
||||||
|
using InnerDeclVisitor = ConstDeclVisitor; |
||||||
|
|
||||||
|
public: |
||||||
|
ASTNodeVisitor(llvm::raw_ostream& OS, clang::ASTContext& Ctx, Parser& parser) |
||||||
|
: NodeStreamer(OS) |
||||||
|
, parser(parser) |
||||||
|
, SM(Ctx.getSourceManager()) |
||||||
|
, Ctx(Ctx) |
||||||
|
, NameMangler(Ctx) |
||||||
|
, PrintPolicy(Ctx.getPrintingPolicy()) |
||||||
|
, Traits(Ctx.getCommentCommandTraits()) |
||||||
|
, LastLocLine(0) |
||||||
|
, LastLocPresumedLine(0) |
||||||
|
{ |
||||||
|
declMap.reserve(32768); |
||||||
|
typeMap.reserve(32768); |
||||||
|
stmtMap.reserve(32768); |
||||||
|
} |
||||||
|
|
||||||
|
void Visit(const clang::Attr* A); |
||||||
|
void Visit(const clang::Stmt* S); |
||||||
|
void Visit(const clang::Type* T); |
||||||
|
void Visit(clang::QualType T); |
||||||
|
AST::Declaration* Visit(const clang::Decl* D); |
||||||
|
void Visit(clang::TypeLoc TL); |
||||||
|
|
||||||
|
void Visit(const clang::comments::Comment* C, const clang::comments::FullComment* FC); |
||||||
|
void Visit(const clang::TemplateArgument& TA, clang::SourceRange R = {}, const clang::Decl* From = nullptr, llvm::StringRef Label = {}); |
||||||
|
void Visit(const clang::CXXCtorInitializer* Init); |
||||||
|
// void Visit(const OpenACCClause* C) {}
|
||||||
|
void Visit(const clang::OMPClause* C) {} |
||||||
|
void Visit(const clang::BlockDecl::Capture& C); |
||||||
|
void Visit(const clang::GenericSelectionExpr::ConstAssociation& A); |
||||||
|
void Visit(const clang::concepts::Requirement* R); |
||||||
|
void Visit(const clang::APValue& Value, clang::QualType Ty); |
||||||
|
void Visit(const clang::ConceptReference*); |
||||||
|
|
||||||
|
void VisitAliasAttr(const clang::AliasAttr* AA); |
||||||
|
void VisitCleanupAttr(const clang::CleanupAttr* CA); |
||||||
|
void VisitDeprecatedAttr(const clang::DeprecatedAttr* DA); |
||||||
|
void VisitUnavailableAttr(const clang::UnavailableAttr* UA); |
||||||
|
void VisitSectionAttr(const clang::SectionAttr* SA); |
||||||
|
void VisitVisibilityAttr(const clang::VisibilityAttr* VA); |
||||||
|
void VisitTLSModelAttr(const clang::TLSModelAttr* TA); |
||||||
|
|
||||||
|
void VisitTypedefType(const clang::TypedefType* TT); |
||||||
|
void VisitUsingType(const clang::UsingType* TT); |
||||||
|
void VisitFunctionType(const clang::FunctionType* T); |
||||||
|
void VisitFunctionProtoType(const clang::FunctionProtoType* T); |
||||||
|
void VisitRValueReferenceType(const clang::ReferenceType* RT); |
||||||
|
void VisitArrayType(const clang::ArrayType* AT); |
||||||
|
void VisitConstantArrayType(const clang::ConstantArrayType* CAT); |
||||||
|
void VisitDependentSizedExtVectorType(const clang::DependentSizedExtVectorType* VT); |
||||||
|
void VisitVectorType(const clang::VectorType* VT); |
||||||
|
void VisitUnresolvedUsingType(const clang::UnresolvedUsingType* UUT); |
||||||
|
void VisitUnaryTransformType(const clang::UnaryTransformType* UTT); |
||||||
|
void VisitTagType(const clang::TagType* TT); |
||||||
|
void VisitTemplateTypeParmType(const clang::TemplateTypeParmType* TTPT); |
||||||
|
void VisitSubstTemplateTypeParmType(const clang::SubstTemplateTypeParmType* STTPT); |
||||||
|
void VisitSubstTemplateTypeParmPackType(const clang::SubstTemplateTypeParmPackType* T); |
||||||
|
void VisitAutoType(const clang::AutoType* AT); |
||||||
|
void VisitTemplateSpecializationType(const clang::TemplateSpecializationType* TST); |
||||||
|
void VisitInjectedClassNameType(const clang::InjectedClassNameType* ICNT); |
||||||
|
void VisitObjCInterfaceType(const clang::ObjCInterfaceType* OIT); |
||||||
|
void VisitPackExpansionType(const clang::PackExpansionType* PET); |
||||||
|
void VisitElaboratedType(const clang::ElaboratedType* ET); |
||||||
|
void VisitMacroQualifiedType(const clang::MacroQualifiedType* MQT); |
||||||
|
void VisitMemberPointerType(const clang::MemberPointerType* MPT); |
||||||
|
|
||||||
|
AST::Declaration* VisitTranslationUnitDecl(const clang::TranslationUnitDecl* D); |
||||||
|
AST::Declaration* VisitNamedDecl(const clang::NamedDecl* ND); |
||||||
|
void HandleNamedDecl(AST::Declaration& AST_ND, const clang::NamedDecl* ND); |
||||||
|
AST::Declaration* VisitTypedefDecl(const clang::TypedefDecl* TD); |
||||||
|
AST::Declaration* VisitTypeAliasDecl(const clang::TypeAliasDecl* TAD); |
||||||
|
AST::Declaration* VisitNamespaceDecl(const clang::NamespaceDecl* ND); |
||||||
|
AST::Declaration* VisitUsingDirectiveDecl(const clang::UsingDirectiveDecl* UDD); |
||||||
|
AST::Declaration* VisitNamespaceAliasDecl(const clang::NamespaceAliasDecl* NAD); |
||||||
|
AST::Declaration* VisitUsingDecl(const clang::UsingDecl* UD); |
||||||
|
AST::Declaration* VisitUsingEnumDecl(const clang::UsingEnumDecl* UED); |
||||||
|
AST::Declaration* VisitUsingShadowDecl(const clang::UsingShadowDecl* USD); |
||||||
|
AST::Declaration* VisitVarDecl(const clang::VarDecl* VD); |
||||||
|
AST::Declaration* VisitFieldDecl(const clang::FieldDecl* FD); |
||||||
|
AST::Declaration* VisitFunctionDecl(const clang::FunctionDecl* FD); |
||||||
|
AST::Declaration* VisitEnumDecl(const clang::EnumDecl* ED); |
||||||
|
AST::Declaration* VisitEnumConstantDecl(const clang::EnumConstantDecl* ECD); |
||||||
|
AST::Declaration* VisitRecordDecl(const clang::RecordDecl* RD); |
||||||
|
AST::Declaration* VisitCXXRecordDecl(const clang::CXXRecordDecl* RD); |
||||||
|
AST::Declaration* VisitHLSLBufferDecl(const clang::HLSLBufferDecl* D); |
||||||
|
AST::Declaration* VisitTemplateTypeParmDecl(const clang::TemplateTypeParmDecl* D); |
||||||
|
AST::Declaration* VisitNonTypeTemplateParmDecl(const clang::NonTypeTemplateParmDecl* D); |
||||||
|
AST::Declaration* VisitTemplateTemplateParmDecl(const clang::TemplateTemplateParmDecl* D); |
||||||
|
AST::Declaration* VisitLinkageSpecDecl(const clang::LinkageSpecDecl* LSD); |
||||||
|
AST::Declaration* VisitAccessSpecDecl(const clang::AccessSpecDecl* ASD); |
||||||
|
AST::Declaration* VisitFriendDecl(const clang::FriendDecl* FD); |
||||||
|
|
||||||
|
AST::Declaration* VisitObjCIvarDecl(const clang::ObjCIvarDecl* D); |
||||||
|
AST::Declaration* VisitObjCMethodDecl(const clang::ObjCMethodDecl* D); |
||||||
|
AST::Declaration* VisitObjCTypeParamDecl(const clang::ObjCTypeParamDecl* D); |
||||||
|
AST::Declaration* VisitObjCCategoryDecl(const clang::ObjCCategoryDecl* D); |
||||||
|
AST::Declaration* VisitObjCCategoryImplDecl(const clang::ObjCCategoryImplDecl* D); |
||||||
|
AST::Declaration* VisitObjCProtocolDecl(const clang::ObjCProtocolDecl* D); |
||||||
|
AST::Declaration* VisitObjCInterfaceDecl(const clang::ObjCInterfaceDecl* D); |
||||||
|
AST::Declaration* VisitObjCImplementationDecl(const clang::ObjCImplementationDecl* D); |
||||||
|
AST::Declaration* VisitObjCCompatibleAliasDecl(const clang::ObjCCompatibleAliasDecl* D); |
||||||
|
AST::Declaration* VisitObjCPropertyDecl(const clang::ObjCPropertyDecl* D); |
||||||
|
AST::Declaration* VisitObjCPropertyImplDecl(const clang::ObjCPropertyImplDecl* D); |
||||||
|
AST::Declaration* VisitBlockDecl(const clang::BlockDecl* D); |
||||||
|
|
||||||
|
/*#define DECL(CLASS, BASE) \
|
||||||
|
void Convert##CLASS##DeclImpl(const clang::CLASS##Decl* Src, AST::CLASS##Decl& Dst); \ |
||||||
|
void Convert##CLASS##Decl(const clang::CLASS##Decl* Src, AST::CLASS##Decl& Dst) \ |
||||||
|
{ \ |
||||||
|
Convert##BASE##Decl(Src, Dst); \ |
||||||
|
Convert##CLASS##DeclImpl(Src, Dst); \ |
||||||
|
} |
||||||
|
#include "clang/AST/DeclNodes.inc" |
||||||
|
|
||||||
|
// Declare Visit*() for all concrete Decl classes.
|
||||||
|
#define ABSTRACT_DECL(DECL) |
||||||
|
#define DECL(CLASS, BASE) \ |
||||||
|
void Visit##CLASS##Decl(const CLASS##Decl* D) \ |
||||||
|
{ \ |
||||||
|
if (declMap.find(D) != declMap.end()) \ |
||||||
|
return; \ |
||||||
|
\ |
||||||
|
auto res = declMap.emplace(D, new AST::CLASS##Decl()); \ |
||||||
|
Convert##CLASS##Decl(D, res.first->second); \ |
||||||
|
} |
||||||
|
#include "clang/AST/DeclNodes.inc" |
||||||
|
// The above header #undefs ABSTRACT_DECL and DECL upon exit.*/
|
||||||
|
|
||||||
|
|
||||||
|
void ConvertStmt(const clang::Stmt* Src, AST::Stmt& Dst); |
||||||
|
|
||||||
|
#define STMT(CLASS, BASE) \ |
||||||
|
void Convert##CLASS##Impl(const clang::CLASS* Src, AST::CLASS& Dst); \ |
||||||
|
void Convert##CLASS(const clang::CLASS* Src, AST::CLASS& Dst) \ |
||||||
|
{ \ |
||||||
|
Convert##BASE(Src, Dst); \ |
||||||
|
Convert##CLASS##Impl(Src, Dst); \ |
||||||
|
} |
||||||
|
#include "StmtNodes.inc" |
||||||
|
|
||||||
|
// Declare Visit*() for all concrete Stmt classes.
|
||||||
|
#define ABSTRACT_STMT(STMT) |
||||||
|
#define STMT(CLASS, BASE) \ |
||||||
|
void Visit##CLASS(const clang::CLASS* S) \ |
||||||
|
{ \ |
||||||
|
if (!S || stmtMap.find(S) != stmtMap.end()) \ |
||||||
|
return; \ |
||||||
|
\ |
||||||
|
auto res = stmtMap.emplace(S, new AST::CLASS()); \ |
||||||
|
Convert##CLASS(S, static_cast<AST::CLASS&>(*res.first->second)); \ |
||||||
|
} |
||||||
|
#include "StmtNodes.inc" |
||||||
|
// The above header #undefs ABSTRACT_STMT and STMT upon exit.
|
||||||
|
|
||||||
|
void VisitNullTemplateArgument(const clang::TemplateArgument& TA); |
||||||
|
void VisitTypeTemplateArgument(const clang::TemplateArgument& TA); |
||||||
|
void VisitDeclarationTemplateArgument(const clang::TemplateArgument& TA); |
||||||
|
void VisitNullPtrTemplateArgument(const clang::TemplateArgument& TA); |
||||||
|
void VisitIntegralTemplateArgument(const clang::TemplateArgument& TA); |
||||||
|
void VisitTemplateTemplateArgument(const clang::TemplateArgument& TA); |
||||||
|
void VisitTemplateExpansionTemplateArgument(const clang::TemplateArgument& TA); |
||||||
|
void VisitExpressionTemplateArgument(const clang::TemplateArgument& TA); |
||||||
|
void VisitPackTemplateArgument(const clang::TemplateArgument& TA); |
||||||
|
|
||||||
|
void visitTextComment(const clang::comments::TextComment* C, const clang::comments::FullComment*); |
||||||
|
void visitInlineCommandComment(const clang::comments::InlineCommandComment* C, const clang::comments::FullComment*); |
||||||
|
void visitHTMLStartTagComment(const clang::comments::HTMLStartTagComment* C, const clang::comments::FullComment*); |
||||||
|
void visitHTMLEndTagComment(const clang::comments::HTMLEndTagComment* C, const clang::comments::FullComment*); |
||||||
|
void visitBlockCommandComment(const clang::comments::BlockCommandComment* C, const clang::comments::FullComment*); |
||||||
|
void visitParamCommandComment(const clang::comments::ParamCommandComment* C, const clang::comments::FullComment* FC); |
||||||
|
void visitTParamCommandComment(const clang::comments::TParamCommandComment* C, const clang::comments::FullComment* FC); |
||||||
|
void visitVerbatimBlockComment(const clang::comments::VerbatimBlockComment* C, const clang::comments::FullComment*); |
||||||
|
void visitVerbatimBlockLineComment(const clang::comments::VerbatimBlockLineComment* C, const clang::comments::FullComment*); |
||||||
|
void visitVerbatimLineComment(const clang::comments::VerbatimLineComment* C, const clang::comments::FullComment*); |
||||||
|
|
||||||
|
private: |
||||||
|
void attributeOnlyIfTrue(llvm::StringRef Key, bool Value) |
||||||
|
{ |
||||||
|
if (Value) |
||||||
|
JOS.attribute(Key, Value); |
||||||
|
} |
||||||
|
|
||||||
|
void writeIncludeStack(clang::PresumedLoc Loc, bool JustFirst = false); |
||||||
|
|
||||||
|
// Writes the attributes of a SourceLocation object without.
|
||||||
|
void writeBareSourceLocation(clang::SourceLocation Loc, bool IsSpelling, bool addFileInfo); |
||||||
|
|
||||||
|
// Writes the attributes of a SourceLocation to JSON based on its presumed
|
||||||
|
// spelling location. If the given location represents a macro invocation,
|
||||||
|
// this outputs two sub-objects: one for the spelling and one for the
|
||||||
|
// expansion location.
|
||||||
|
void writeSourceLocation(clang::SourceLocation Loc, bool addFileInfo = true); |
||||||
|
void writeSourceRange(clang::SourceRange R); |
||||||
|
std::string createPointerRepresentation(const void* Ptr); |
||||||
|
llvm::json::Object createQualType(clang::QualType QT, bool Desugar = true); |
||||||
|
AST::QualifiedType CreateQualifiedType(clang::QualType QT, bool Desugar = true); |
||||||
|
llvm::json::Object createBareDeclRef(const clang::Decl* D); |
||||||
|
llvm::json::Object createFPOptions(clang::FPOptionsOverride FPO); |
||||||
|
void writeBareDeclRef(const clang::Decl* D); |
||||||
|
llvm::json::Object createCXXRecordDefinitionData(const clang::CXXRecordDecl* RD); |
||||||
|
llvm::json::Object createCXXBaseSpecifier(const clang::CXXBaseSpecifier& BS); |
||||||
|
std::string createAccessSpecifier(clang::AccessSpecifier AS); |
||||||
|
llvm::json::Array createCastPath(const clang::CastExpr* C); |
||||||
|
|
||||||
|
void writePreviousDeclImpl(...) {} |
||||||
|
|
||||||
|
template <typename T> |
||||||
|
void writePreviousDeclImpl(const clang::Mergeable<T>* D) |
||||||
|
{ |
||||||
|
const T* First = D->getFirstDecl(); |
||||||
|
if (First != D) |
||||||
|
JOS.attribute("firstRedecl", createPointerRepresentation(First)); |
||||||
|
} |
||||||
|
|
||||||
|
template <typename T> |
||||||
|
void writePreviousDeclImpl(const clang::Redeclarable<T>* D) |
||||||
|
{ |
||||||
|
const T* Prev = D->getPreviousDecl(); |
||||||
|
if (Prev) |
||||||
|
JOS.attribute("previousDecl", createPointerRepresentation(Prev)); |
||||||
|
} |
||||||
|
|
||||||
|
[[nodiscard]] std::string GetMangledName(const clang::NamedDecl& ND) const; |
||||||
|
void ConvertNamedRecord(AST::Declaration& dst, const clang::NamedDecl& src) const; |
||||||
|
|
||||||
|
void addPreviousDeclaration(const clang::Decl* D); |
||||||
|
|
||||||
|
llvm::StringRef getCommentCommandName(unsigned CommandID) const; |
||||||
|
|
||||||
|
template <typename Fn> |
||||||
|
AST::Declaration* FindOrInsertLazy(const clang::Decl* D, Fn&& inserter) |
||||||
|
{ |
||||||
|
if (auto it = declMap.find(D); it != declMap.end()) |
||||||
|
return it->second; |
||||||
|
|
||||||
|
auto res = declMap.emplace(D, std::invoke(inserter)); |
||||||
|
return res.first->second; |
||||||
|
} |
||||||
|
|
||||||
|
std::unordered_map<const clang::Decl*, AST::Declaration*> declMap; |
||||||
|
std::unordered_set<const clang::Type*> typeMap; |
||||||
|
std::unordered_map<const clang::Stmt*, AST::Stmt*> stmtMap; |
||||||
|
|
||||||
|
Parser& parser; |
||||||
|
const clang::SourceManager& SM; |
||||||
|
clang::ASTContext& Ctx; |
||||||
|
ASTNameMangler NameMangler; // TODO: Remove this, or the parser one
|
||||||
|
clang::PrintingPolicy PrintPolicy; |
||||||
|
const clang::comments::CommandTraits& Traits; |
||||||
|
llvm::StringRef LastLocFilename, LastLocPresumedFilename; |
||||||
|
unsigned LastLocLine, LastLocPresumedLine; |
||||||
|
}; |
||||||
|
|
||||||
|
class ASTNodeDumper : public clang::ASTNodeTraverser<ASTNodeDumper, ASTNodeVisitor> |
||||||
|
{ |
||||||
|
public: |
||||||
|
ASTNodeDumper(llvm::raw_ostream& OS, clang::ASTContext& Ctx, Parser& parser) |
||||||
|
: NodeVisitor(OS, Ctx, parser) |
||||||
|
{ |
||||||
|
setDeserialize(true); |
||||||
|
} |
||||||
|
|
||||||
|
ASTNodeVisitor& doGetNodeDelegate() { return NodeVisitor; } |
||||||
|
|
||||||
|
void VisitFunctionTemplateDecl(const clang::FunctionTemplateDecl* FTD) |
||||||
|
{ |
||||||
|
writeTemplateDecl(FTD, true); |
||||||
|
} |
||||||
|
void VisitClassTemplateDecl(const clang::ClassTemplateDecl* CTD) |
||||||
|
{ |
||||||
|
writeTemplateDecl(CTD, false); |
||||||
|
} |
||||||
|
void VisitVarTemplateDecl(const clang::VarTemplateDecl* VTD) |
||||||
|
{ |
||||||
|
writeTemplateDecl(VTD, false); |
||||||
|
} |
||||||
|
|
||||||
|
private: |
||||||
|
template <typename SpecializationDecl> |
||||||
|
void writeTemplateDeclSpecialization(const SpecializationDecl* SD, bool DumpExplicitInst, bool DumpRefOnly) |
||||||
|
{ |
||||||
|
bool DumpedAny = false; |
||||||
|
for (const auto* RedeclWithBadType : SD->redecls()) |
||||||
|
{ |
||||||
|
// FIXME: The redecls() range sometimes has elements of a less-specific
|
||||||
|
// type. (In particular, ClassTemplateSpecializationDecl::redecls() gives
|
||||||
|
// us TagDecls, and should give CXXRecordDecls).
|
||||||
|
const auto* Redecl = clang::dyn_cast<SpecializationDecl>(RedeclWithBadType); |
||||||
|
if (!Redecl) |
||||||
|
{ |
||||||
|
// Found the injected-class-name for a class template. This will be
|
||||||
|
// dumped as part of its surrounding class so we don't need to dump it
|
||||||
|
// here.
|
||||||
|
assert(clang::isa<clang::CXXRecordDecl>(RedeclWithBadType) && |
||||||
|
"expected an injected-class-name"); |
||||||
|
continue; |
||||||
|
} |
||||||
|
|
||||||
|
switch (Redecl->getTemplateSpecializationKind()) |
||||||
|
{ |
||||||
|
case clang::TSK_ExplicitInstantiationDeclaration: |
||||||
|
case clang::TSK_ExplicitInstantiationDefinition: |
||||||
|
if (!DumpExplicitInst) |
||||||
|
break; |
||||||
|
[[fallthrough]]; |
||||||
|
case clang::TSK_Undeclared: |
||||||
|
case clang::TSK_ImplicitInstantiation: |
||||||
|
if (DumpRefOnly) |
||||||
|
NodeVisitor.AddChild([=] |
||||||
|
{ |
||||||
|
NodeVisitor.writeBareDeclRef(Redecl); |
||||||
|
}); |
||||||
|
else |
||||||
|
Visit(Redecl); |
||||||
|
DumpedAny = true; |
||||||
|
break; |
||||||
|
case clang::TSK_ExplicitSpecialization: |
||||||
|
break; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
// Ensure we dump at least one decl for each specialization.
|
||||||
|
if (!DumpedAny) |
||||||
|
NodeVisitor.AddChild([=] |
||||||
|
{ |
||||||
|
NodeVisitor.writeBareDeclRef(SD); |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
template <typename TemplateDecl> |
||||||
|
void writeTemplateDecl(const TemplateDecl* TD, bool DumpExplicitInst) |
||||||
|
{ |
||||||
|
// FIXME: it would be nice to dump template parameters and specializations
|
||||||
|
// to their own named arrays rather than shoving them into the "inner"
|
||||||
|
// array. However, template declarations are currently being handled at the
|
||||||
|
// wrong "level" of the traversal hierarchy and so it is difficult to
|
||||||
|
// achieve without losing information elsewhere.
|
||||||
|
|
||||||
|
dumpTemplateParameters(TD->getTemplateParameters()); |
||||||
|
|
||||||
|
Visit(TD->getTemplatedDecl()); |
||||||
|
|
||||||
|
// TODO: Fixme. Crash in specializations iterator (clang bug?)
|
||||||
|
// for (const auto* Child : TD->specializations())
|
||||||
|
// writeTemplateDeclSpecialization(Child, DumpExplicitInst, !TD->isCanonicalDecl());
|
||||||
|
} |
||||||
|
|
||||||
|
ASTNodeVisitor NodeVisitor; |
||||||
|
}; |
||||||
|
|
||||||
|
class ASTParser : public clang::RecursiveASTVisitor<ASTParser> |
||||||
|
{ |
||||||
|
bool shouldVisitTemplateInstantiations() const { return true; } |
||||||
|
bool shouldWalkTypesOfTypeLocs() const { return true; } |
||||||
|
bool shouldVisitImplicitCode() const { return true; } |
||||||
|
bool shouldVisitLambdaBody() const { return true; } |
||||||
|
bool shouldTraversePostOrder() const { return true; } |
||||||
|
|
||||||
|
/*void HandleNamedDecl(AST::Declaration& AST_ND, const clang::NamedDecl* ND);
|
||||||
|
|
||||||
|
bool VisitTranslationUnitDecl(const clang::TranslationUnitDecl* D); |
||||||
|
bool VisitNamedDecl(const clang::NamedDecl* ND); |
||||||
|
bool VisitTypedefDecl(const clang::TypedefDecl* TD); |
||||||
|
bool VisitTypeAliasDecl(const clang::TypeAliasDecl* TAD); |
||||||
|
bool VisitNamespaceDecl(const clang::NamespaceDecl* ND); |
||||||
|
bool VisitUsingDirectiveDecl(const clang::UsingDirectiveDecl* UDD); |
||||||
|
bool VisitNamespaceAliasDecl(const clang::NamespaceAliasDecl* NAD); |
||||||
|
bool VisitUsingDecl(const clang::UsingDecl* UD); |
||||||
|
bool VisitUsingEnumDecl(const clang::UsingEnumDecl* UED); |
||||||
|
bool VisitUsingShadowDecl(const clang::UsingShadowDecl* USD); |
||||||
|
bool VisitVarDecl(const clang::VarDecl* VD); |
||||||
|
bool VisitFieldDecl(const clang::FieldDecl* FD); |
||||||
|
bool VisitFunctionDecl(const clang::FunctionDecl* FD); |
||||||
|
bool VisitEnumDecl(const clang::EnumDecl* ED); |
||||||
|
bool VisitEnumConstantDecl(const clang::EnumConstantDecl* ECD); |
||||||
|
bool VisitRecordDecl(const clang::RecordDecl* RD); |
||||||
|
bool VisitCXXRecordDecl(const clang::CXXRecordDecl* RD); |
||||||
|
bool VisitHLSLBufferDecl(const clang::HLSLBufferDecl* D); |
||||||
|
bool VisitTemplateTypeParmDecl(const clang::TemplateTypeParmDecl* D); |
||||||
|
bool VisitNonTypeTemplateParmDecl(const clang::NonTypeTemplateParmDecl* D); |
||||||
|
bool VisitTemplateTemplateParmDecl(const clang::TemplateTemplateParmDecl* D); |
||||||
|
bool VisitLinkageSpecDecl(const clang::LinkageSpecDecl* LSD); |
||||||
|
bool VisitAccessSpecDecl(const clang::AccessSpecDecl* ASD); |
||||||
|
bool VisitFriendDecl(const clang::FriendDecl* FD);*/ |
||||||
|
}; |
||||||
|
} // namespace CppSharp::CppParser
|
@ -0,0 +1,923 @@ |
|||||||
|
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
||||||
|
|* *| |
||||||
|
|* List of AST nodes of a particular kind *| |
||||||
|
|* *| |
||||||
|
|* Automatically generated file, do not edit! *| |
||||||
|
|* *| |
||||||
|
\*===----------------------------------------------------------------------===*/ |
||||||
|
|
||||||
|
#ifndef ABSTRACT_STMT |
||||||
|
# define ABSTRACT_STMT(Type) Type |
||||||
|
#endif |
||||||
|
#ifndef STMT_RANGE |
||||||
|
# define STMT_RANGE(Base, First, Last) |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef LAST_STMT_RANGE |
||||||
|
# define LAST_STMT_RANGE(Base, First, Last) STMT_RANGE(Base, First, Last) |
||||||
|
#endif |
||||||
|
|
||||||
|
#ifndef ASMSTMT |
||||||
|
# define ASMSTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
ABSTRACT_STMT(ASMSTMT(AsmStmt, Stmt)) |
||||||
|
#ifndef GCCASMSTMT |
||||||
|
# define GCCASMSTMT(Type, Base) ASMSTMT(Type, Base) |
||||||
|
#endif |
||||||
|
GCCASMSTMT(GCCAsmStmt, AsmStmt) |
||||||
|
#undef GCCASMSTMT |
||||||
|
|
||||||
|
#ifndef MSASMSTMT |
||||||
|
# define MSASMSTMT(Type, Base) ASMSTMT(Type, Base) |
||||||
|
#endif |
||||||
|
MSASMSTMT(MSAsmStmt, AsmStmt) |
||||||
|
#undef MSASMSTMT |
||||||
|
|
||||||
|
STMT_RANGE(AsmStmt, GCCAsmStmt, MSAsmStmt) |
||||||
|
|
||||||
|
#undef ASMSTMT |
||||||
|
|
||||||
|
#ifndef BREAKSTMT |
||||||
|
# define BREAKSTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
BREAKSTMT(BreakStmt, Stmt) |
||||||
|
#undef BREAKSTMT |
||||||
|
|
||||||
|
#ifndef CXXCATCHSTMT |
||||||
|
# define CXXCATCHSTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
CXXCATCHSTMT(CXXCatchStmt, Stmt) |
||||||
|
#undef CXXCATCHSTMT |
||||||
|
|
||||||
|
#ifndef CXXFORRANGESTMT |
||||||
|
# define CXXFORRANGESTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
CXXFORRANGESTMT(CXXForRangeStmt, Stmt) |
||||||
|
#undef CXXFORRANGESTMT |
||||||
|
|
||||||
|
#ifndef CXXTRYSTMT |
||||||
|
# define CXXTRYSTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
CXXTRYSTMT(CXXTryStmt, Stmt) |
||||||
|
#undef CXXTRYSTMT |
||||||
|
|
||||||
|
#ifndef CAPTUREDSTMT |
||||||
|
# define CAPTUREDSTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
CAPTUREDSTMT(CapturedStmt, Stmt) |
||||||
|
#undef CAPTUREDSTMT |
||||||
|
|
||||||
|
#ifndef COMPOUNDSTMT |
||||||
|
# define COMPOUNDSTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
COMPOUNDSTMT(CompoundStmt, Stmt) |
||||||
|
#undef COMPOUNDSTMT |
||||||
|
|
||||||
|
#ifndef CONTINUESTMT |
||||||
|
# define CONTINUESTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
CONTINUESTMT(ContinueStmt, Stmt) |
||||||
|
#undef CONTINUESTMT |
||||||
|
|
||||||
|
#ifndef CORETURNSTMT |
||||||
|
# define CORETURNSTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
CORETURNSTMT(CoreturnStmt, Stmt) |
||||||
|
#undef CORETURNSTMT |
||||||
|
|
||||||
|
#ifndef COROUTINEBODYSTMT |
||||||
|
# define COROUTINEBODYSTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
COROUTINEBODYSTMT(CoroutineBodyStmt, Stmt) |
||||||
|
#undef COROUTINEBODYSTMT |
||||||
|
|
||||||
|
#ifndef DECLSTMT |
||||||
|
# define DECLSTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
DECLSTMT(DeclStmt, Stmt) |
||||||
|
#undef DECLSTMT |
||||||
|
|
||||||
|
#ifndef DOSTMT |
||||||
|
# define DOSTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
DOSTMT(DoStmt, Stmt) |
||||||
|
#undef DOSTMT |
||||||
|
|
||||||
|
#ifndef FORSTMT |
||||||
|
# define FORSTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
FORSTMT(ForStmt, Stmt) |
||||||
|
#undef FORSTMT |
||||||
|
|
||||||
|
#ifndef GOTOSTMT |
||||||
|
# define GOTOSTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
GOTOSTMT(GotoStmt, Stmt) |
||||||
|
#undef GOTOSTMT |
||||||
|
|
||||||
|
#ifndef IFSTMT |
||||||
|
# define IFSTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
IFSTMT(IfStmt, Stmt) |
||||||
|
#undef IFSTMT |
||||||
|
|
||||||
|
#ifndef INDIRECTGOTOSTMT |
||||||
|
# define INDIRECTGOTOSTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
INDIRECTGOTOSTMT(IndirectGotoStmt, Stmt) |
||||||
|
#undef INDIRECTGOTOSTMT |
||||||
|
|
||||||
|
#ifndef MSDEPENDENTEXISTSSTMT |
||||||
|
# define MSDEPENDENTEXISTSSTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
MSDEPENDENTEXISTSSTMT(MSDependentExistsStmt, Stmt) |
||||||
|
#undef MSDEPENDENTEXISTSSTMT |
||||||
|
|
||||||
|
#ifndef NULLSTMT |
||||||
|
# define NULLSTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
NULLSTMT(NullStmt, Stmt) |
||||||
|
#undef NULLSTMT |
||||||
|
|
||||||
|
// Removed OMP nodes |
||||||
|
// Removed OBJC nodes |
||||||
|
|
||||||
|
#ifndef RETURNSTMT |
||||||
|
# define RETURNSTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
RETURNSTMT(ReturnStmt, Stmt) |
||||||
|
#undef RETURNSTMT |
||||||
|
|
||||||
|
#ifndef SEHEXCEPTSTMT |
||||||
|
# define SEHEXCEPTSTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
SEHEXCEPTSTMT(SEHExceptStmt, Stmt) |
||||||
|
#undef SEHEXCEPTSTMT |
||||||
|
|
||||||
|
#ifndef SEHFINALLYSTMT |
||||||
|
# define SEHFINALLYSTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
SEHFINALLYSTMT(SEHFinallyStmt, Stmt) |
||||||
|
#undef SEHFINALLYSTMT |
||||||
|
|
||||||
|
#ifndef SEHLEAVESTMT |
||||||
|
# define SEHLEAVESTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
SEHLEAVESTMT(SEHLeaveStmt, Stmt) |
||||||
|
#undef SEHLEAVESTMT |
||||||
|
|
||||||
|
#ifndef SEHTRYSTMT |
||||||
|
# define SEHTRYSTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
SEHTRYSTMT(SEHTryStmt, Stmt) |
||||||
|
#undef SEHTRYSTMT |
||||||
|
|
||||||
|
#ifndef SWITCHCASE |
||||||
|
# define SWITCHCASE(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
ABSTRACT_STMT(SWITCHCASE(SwitchCase, Stmt)) |
||||||
|
#ifndef CASESTMT |
||||||
|
# define CASESTMT(Type, Base) SWITCHCASE(Type, Base) |
||||||
|
#endif |
||||||
|
CASESTMT(CaseStmt, SwitchCase) |
||||||
|
#undef CASESTMT |
||||||
|
|
||||||
|
#ifndef DEFAULTSTMT |
||||||
|
# define DEFAULTSTMT(Type, Base) SWITCHCASE(Type, Base) |
||||||
|
#endif |
||||||
|
DEFAULTSTMT(DefaultStmt, SwitchCase) |
||||||
|
#undef DEFAULTSTMT |
||||||
|
|
||||||
|
STMT_RANGE(SwitchCase, CaseStmt, DefaultStmt) |
||||||
|
|
||||||
|
#undef SWITCHCASE |
||||||
|
|
||||||
|
#ifndef SWITCHSTMT |
||||||
|
# define SWITCHSTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
SWITCHSTMT(SwitchStmt, Stmt) |
||||||
|
#undef SWITCHSTMT |
||||||
|
|
||||||
|
#ifndef VALUESTMT |
||||||
|
# define VALUESTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
ABSTRACT_STMT(VALUESTMT(ValueStmt, Stmt)) |
||||||
|
#ifndef ATTRIBUTEDSTMT |
||||||
|
# define ATTRIBUTEDSTMT(Type, Base) VALUESTMT(Type, Base) |
||||||
|
#endif |
||||||
|
ATTRIBUTEDSTMT(AttributedStmt, ValueStmt) |
||||||
|
#undef ATTRIBUTEDSTMT |
||||||
|
|
||||||
|
#ifndef EXPR |
||||||
|
# define EXPR(Type, Base) VALUESTMT(Type, Base) |
||||||
|
#endif |
||||||
|
ABSTRACT_STMT(EXPR(Expr, ValueStmt)) |
||||||
|
#ifndef ABSTRACTCONDITIONALOPERATOR |
||||||
|
# define ABSTRACTCONDITIONALOPERATOR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
ABSTRACT_STMT(ABSTRACTCONDITIONALOPERATOR(AbstractConditionalOperator, Expr)) |
||||||
|
#ifndef BINARYCONDITIONALOPERATOR |
||||||
|
# define BINARYCONDITIONALOPERATOR(Type, Base) ABSTRACTCONDITIONALOPERATOR(Type, Base) |
||||||
|
#endif |
||||||
|
BINARYCONDITIONALOPERATOR(BinaryConditionalOperator, AbstractConditionalOperator) |
||||||
|
#undef BINARYCONDITIONALOPERATOR |
||||||
|
|
||||||
|
#ifndef CONDITIONALOPERATOR |
||||||
|
# define CONDITIONALOPERATOR(Type, Base) ABSTRACTCONDITIONALOPERATOR(Type, Base) |
||||||
|
#endif |
||||||
|
CONDITIONALOPERATOR(ConditionalOperator, AbstractConditionalOperator) |
||||||
|
#undef CONDITIONALOPERATOR |
||||||
|
|
||||||
|
STMT_RANGE(AbstractConditionalOperator, BinaryConditionalOperator, ConditionalOperator) |
||||||
|
|
||||||
|
#undef ABSTRACTCONDITIONALOPERATOR |
||||||
|
|
||||||
|
#ifndef ADDRLABELEXPR |
||||||
|
# define ADDRLABELEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
ADDRLABELEXPR(AddrLabelExpr, Expr) |
||||||
|
#undef ADDRLABELEXPR |
||||||
|
|
||||||
|
#ifndef ARRAYINITINDEXEXPR |
||||||
|
# define ARRAYINITINDEXEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
ARRAYINITINDEXEXPR(ArrayInitIndexExpr, Expr) |
||||||
|
#undef ARRAYINITINDEXEXPR |
||||||
|
|
||||||
|
#ifndef ARRAYINITLOOPEXPR |
||||||
|
# define ARRAYINITLOOPEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
ARRAYINITLOOPEXPR(ArrayInitLoopExpr, Expr) |
||||||
|
#undef ARRAYINITLOOPEXPR |
||||||
|
|
||||||
|
#ifndef ARRAYSUBSCRIPTEXPR |
||||||
|
# define ARRAYSUBSCRIPTEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
ARRAYSUBSCRIPTEXPR(ArraySubscriptExpr, Expr) |
||||||
|
#undef ARRAYSUBSCRIPTEXPR |
||||||
|
|
||||||
|
#ifndef ARRAYTYPETRAITEXPR |
||||||
|
# define ARRAYTYPETRAITEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
ARRAYTYPETRAITEXPR(ArrayTypeTraitExpr, Expr) |
||||||
|
#undef ARRAYTYPETRAITEXPR |
||||||
|
|
||||||
|
#ifndef ASTYPEEXPR |
||||||
|
# define ASTYPEEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
ASTYPEEXPR(AsTypeExpr, Expr) |
||||||
|
#undef ASTYPEEXPR |
||||||
|
|
||||||
|
#ifndef ATOMICEXPR |
||||||
|
# define ATOMICEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
ATOMICEXPR(AtomicExpr, Expr) |
||||||
|
#undef ATOMICEXPR |
||||||
|
|
||||||
|
#ifndef BINARYOPERATOR |
||||||
|
# define BINARYOPERATOR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
BINARYOPERATOR(BinaryOperator, Expr) |
||||||
|
#ifndef COMPOUNDASSIGNOPERATOR |
||||||
|
# define COMPOUNDASSIGNOPERATOR(Type, Base) BINARYOPERATOR(Type, Base) |
||||||
|
#endif |
||||||
|
COMPOUNDASSIGNOPERATOR(CompoundAssignOperator, BinaryOperator) |
||||||
|
#undef COMPOUNDASSIGNOPERATOR |
||||||
|
|
||||||
|
STMT_RANGE(BinaryOperator, BinaryOperator, CompoundAssignOperator) |
||||||
|
|
||||||
|
#undef BINARYOPERATOR |
||||||
|
|
||||||
|
#ifndef BLOCKEXPR |
||||||
|
# define BLOCKEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
BLOCKEXPR(BlockExpr, Expr) |
||||||
|
#undef BLOCKEXPR |
||||||
|
|
||||||
|
#ifndef CXXBINDTEMPORARYEXPR |
||||||
|
# define CXXBINDTEMPORARYEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXBINDTEMPORARYEXPR(CXXBindTemporaryExpr, Expr) |
||||||
|
#undef CXXBINDTEMPORARYEXPR |
||||||
|
|
||||||
|
#ifndef CXXBOOLLITERALEXPR |
||||||
|
# define CXXBOOLLITERALEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXBOOLLITERALEXPR(CXXBoolLiteralExpr, Expr) |
||||||
|
#undef CXXBOOLLITERALEXPR |
||||||
|
|
||||||
|
#ifndef CXXCONSTRUCTEXPR |
||||||
|
# define CXXCONSTRUCTEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXCONSTRUCTEXPR(CXXConstructExpr, Expr) |
||||||
|
#ifndef CXXTEMPORARYOBJECTEXPR |
||||||
|
# define CXXTEMPORARYOBJECTEXPR(Type, Base) CXXCONSTRUCTEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXTEMPORARYOBJECTEXPR(CXXTemporaryObjectExpr, CXXConstructExpr) |
||||||
|
#undef CXXTEMPORARYOBJECTEXPR |
||||||
|
|
||||||
|
STMT_RANGE(CXXConstructExpr, CXXConstructExpr, CXXTemporaryObjectExpr) |
||||||
|
|
||||||
|
#undef CXXCONSTRUCTEXPR |
||||||
|
|
||||||
|
#ifndef CXXDEFAULTARGEXPR |
||||||
|
# define CXXDEFAULTARGEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXDEFAULTARGEXPR(CXXDefaultArgExpr, Expr) |
||||||
|
#undef CXXDEFAULTARGEXPR |
||||||
|
|
||||||
|
#ifndef CXXDEFAULTINITEXPR |
||||||
|
# define CXXDEFAULTINITEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXDEFAULTINITEXPR(CXXDefaultInitExpr, Expr) |
||||||
|
#undef CXXDEFAULTINITEXPR |
||||||
|
|
||||||
|
#ifndef CXXDELETEEXPR |
||||||
|
# define CXXDELETEEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXDELETEEXPR(CXXDeleteExpr, Expr) |
||||||
|
#undef CXXDELETEEXPR |
||||||
|
|
||||||
|
#ifndef CXXDEPENDENTSCOPEMEMBEREXPR |
||||||
|
# define CXXDEPENDENTSCOPEMEMBEREXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXDEPENDENTSCOPEMEMBEREXPR(CXXDependentScopeMemberExpr, Expr) |
||||||
|
#undef CXXDEPENDENTSCOPEMEMBEREXPR |
||||||
|
|
||||||
|
#ifndef CXXFOLDEXPR |
||||||
|
# define CXXFOLDEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXFOLDEXPR(CXXFoldExpr, Expr) |
||||||
|
#undef CXXFOLDEXPR |
||||||
|
|
||||||
|
#ifndef CXXINHERITEDCTORINITEXPR |
||||||
|
# define CXXINHERITEDCTORINITEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXINHERITEDCTORINITEXPR(CXXInheritedCtorInitExpr, Expr) |
||||||
|
#undef CXXINHERITEDCTORINITEXPR |
||||||
|
|
||||||
|
#ifndef CXXNEWEXPR |
||||||
|
# define CXXNEWEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXNEWEXPR(CXXNewExpr, Expr) |
||||||
|
#undef CXXNEWEXPR |
||||||
|
|
||||||
|
#ifndef CXXNOEXCEPTEXPR |
||||||
|
# define CXXNOEXCEPTEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXNOEXCEPTEXPR(CXXNoexceptExpr, Expr) |
||||||
|
#undef CXXNOEXCEPTEXPR |
||||||
|
|
||||||
|
#ifndef CXXNULLPTRLITERALEXPR |
||||||
|
# define CXXNULLPTRLITERALEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXNULLPTRLITERALEXPR(CXXNullPtrLiteralExpr, Expr) |
||||||
|
#undef CXXNULLPTRLITERALEXPR |
||||||
|
|
||||||
|
#ifndef CXXPARENLISTINITEXPR |
||||||
|
# define CXXPARENLISTINITEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXPARENLISTINITEXPR(CXXParenListInitExpr, Expr) |
||||||
|
#undef CXXPARENLISTINITEXPR |
||||||
|
|
||||||
|
#ifndef CXXPSEUDODESTRUCTOREXPR |
||||||
|
# define CXXPSEUDODESTRUCTOREXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXPSEUDODESTRUCTOREXPR(CXXPseudoDestructorExpr, Expr) |
||||||
|
#undef CXXPSEUDODESTRUCTOREXPR |
||||||
|
|
||||||
|
#ifndef CXXREWRITTENBINARYOPERATOR |
||||||
|
# define CXXREWRITTENBINARYOPERATOR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXREWRITTENBINARYOPERATOR(CXXRewrittenBinaryOperator, Expr) |
||||||
|
#undef CXXREWRITTENBINARYOPERATOR |
||||||
|
|
||||||
|
#ifndef CXXSCALARVALUEINITEXPR |
||||||
|
# define CXXSCALARVALUEINITEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXSCALARVALUEINITEXPR(CXXScalarValueInitExpr, Expr) |
||||||
|
#undef CXXSCALARVALUEINITEXPR |
||||||
|
|
||||||
|
#ifndef CXXSTDINITIALIZERLISTEXPR |
||||||
|
# define CXXSTDINITIALIZERLISTEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXSTDINITIALIZERLISTEXPR(CXXStdInitializerListExpr, Expr) |
||||||
|
#undef CXXSTDINITIALIZERLISTEXPR |
||||||
|
|
||||||
|
#ifndef CXXTHISEXPR |
||||||
|
# define CXXTHISEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXTHISEXPR(CXXThisExpr, Expr) |
||||||
|
#undef CXXTHISEXPR |
||||||
|
|
||||||
|
#ifndef CXXTHROWEXPR |
||||||
|
# define CXXTHROWEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXTHROWEXPR(CXXThrowExpr, Expr) |
||||||
|
#undef CXXTHROWEXPR |
||||||
|
|
||||||
|
#ifndef CXXTYPEIDEXPR |
||||||
|
# define CXXTYPEIDEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXTYPEIDEXPR(CXXTypeidExpr, Expr) |
||||||
|
#undef CXXTYPEIDEXPR |
||||||
|
|
||||||
|
#ifndef CXXUNRESOLVEDCONSTRUCTEXPR |
||||||
|
# define CXXUNRESOLVEDCONSTRUCTEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXUNRESOLVEDCONSTRUCTEXPR(CXXUnresolvedConstructExpr, Expr) |
||||||
|
#undef CXXUNRESOLVEDCONSTRUCTEXPR |
||||||
|
|
||||||
|
#ifndef CXXUUIDOFEXPR |
||||||
|
# define CXXUUIDOFEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXUUIDOFEXPR(CXXUuidofExpr, Expr) |
||||||
|
#undef CXXUUIDOFEXPR |
||||||
|
|
||||||
|
#ifndef CALLEXPR |
||||||
|
# define CALLEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CALLEXPR(CallExpr, Expr) |
||||||
|
#ifndef CUDAKERNELCALLEXPR |
||||||
|
# define CUDAKERNELCALLEXPR(Type, Base) CALLEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CUDAKERNELCALLEXPR(CUDAKernelCallExpr, CallExpr) |
||||||
|
#undef CUDAKERNELCALLEXPR |
||||||
|
|
||||||
|
#ifndef CXXMEMBERCALLEXPR |
||||||
|
# define CXXMEMBERCALLEXPR(Type, Base) CALLEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXMEMBERCALLEXPR(CXXMemberCallExpr, CallExpr) |
||||||
|
#undef CXXMEMBERCALLEXPR |
||||||
|
|
||||||
|
#ifndef CXXOPERATORCALLEXPR |
||||||
|
# define CXXOPERATORCALLEXPR(Type, Base) CALLEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXOPERATORCALLEXPR(CXXOperatorCallExpr, CallExpr) |
||||||
|
#undef CXXOPERATORCALLEXPR |
||||||
|
|
||||||
|
#ifndef USERDEFINEDLITERAL |
||||||
|
# define USERDEFINEDLITERAL(Type, Base) CALLEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
USERDEFINEDLITERAL(UserDefinedLiteral, CallExpr) |
||||||
|
#undef USERDEFINEDLITERAL |
||||||
|
|
||||||
|
STMT_RANGE(CallExpr, CallExpr, UserDefinedLiteral) |
||||||
|
|
||||||
|
#undef CALLEXPR |
||||||
|
|
||||||
|
#ifndef CASTEXPR |
||||||
|
# define CASTEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
ABSTRACT_STMT(CASTEXPR(CastExpr, Expr)) |
||||||
|
#ifndef EXPLICITCASTEXPR |
||||||
|
# define EXPLICITCASTEXPR(Type, Base) CASTEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
ABSTRACT_STMT(EXPLICITCASTEXPR(ExplicitCastExpr, CastExpr)) |
||||||
|
#ifndef BUILTINBITCASTEXPR |
||||||
|
# define BUILTINBITCASTEXPR(Type, Base) EXPLICITCASTEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
BUILTINBITCASTEXPR(BuiltinBitCastExpr, ExplicitCastExpr) |
||||||
|
#undef BUILTINBITCASTEXPR |
||||||
|
|
||||||
|
#ifndef CSTYLECASTEXPR |
||||||
|
# define CSTYLECASTEXPR(Type, Base) EXPLICITCASTEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CSTYLECASTEXPR(CStyleCastExpr, ExplicitCastExpr) |
||||||
|
#undef CSTYLECASTEXPR |
||||||
|
|
||||||
|
#ifndef CXXFUNCTIONALCASTEXPR |
||||||
|
# define CXXFUNCTIONALCASTEXPR(Type, Base) EXPLICITCASTEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXFUNCTIONALCASTEXPR(CXXFunctionalCastExpr, ExplicitCastExpr) |
||||||
|
#undef CXXFUNCTIONALCASTEXPR |
||||||
|
|
||||||
|
#ifndef CXXNAMEDCASTEXPR |
||||||
|
# define CXXNAMEDCASTEXPR(Type, Base) EXPLICITCASTEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
ABSTRACT_STMT(CXXNAMEDCASTEXPR(CXXNamedCastExpr, ExplicitCastExpr)) |
||||||
|
#ifndef CXXADDRSPACECASTEXPR |
||||||
|
# define CXXADDRSPACECASTEXPR(Type, Base) CXXNAMEDCASTEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXADDRSPACECASTEXPR(CXXAddrspaceCastExpr, CXXNamedCastExpr) |
||||||
|
#undef CXXADDRSPACECASTEXPR |
||||||
|
|
||||||
|
#ifndef CXXCONSTCASTEXPR |
||||||
|
# define CXXCONSTCASTEXPR(Type, Base) CXXNAMEDCASTEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXCONSTCASTEXPR(CXXConstCastExpr, CXXNamedCastExpr) |
||||||
|
#undef CXXCONSTCASTEXPR |
||||||
|
|
||||||
|
#ifndef CXXDYNAMICCASTEXPR |
||||||
|
# define CXXDYNAMICCASTEXPR(Type, Base) CXXNAMEDCASTEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXDYNAMICCASTEXPR(CXXDynamicCastExpr, CXXNamedCastExpr) |
||||||
|
#undef CXXDYNAMICCASTEXPR |
||||||
|
|
||||||
|
#ifndef CXXREINTERPRETCASTEXPR |
||||||
|
# define CXXREINTERPRETCASTEXPR(Type, Base) CXXNAMEDCASTEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXREINTERPRETCASTEXPR(CXXReinterpretCastExpr, CXXNamedCastExpr) |
||||||
|
#undef CXXREINTERPRETCASTEXPR |
||||||
|
|
||||||
|
#ifndef CXXSTATICCASTEXPR |
||||||
|
# define CXXSTATICCASTEXPR(Type, Base) CXXNAMEDCASTEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CXXSTATICCASTEXPR(CXXStaticCastExpr, CXXNamedCastExpr) |
||||||
|
#undef CXXSTATICCASTEXPR |
||||||
|
|
||||||
|
STMT_RANGE(CXXNamedCastExpr, CXXAddrspaceCastExpr, CXXStaticCastExpr) |
||||||
|
|
||||||
|
#undef CXXNAMEDCASTEXPR |
||||||
|
|
||||||
|
STMT_RANGE(ExplicitCastExpr, BuiltinBitCastExpr, ObjCBridgedCastExpr) |
||||||
|
|
||||||
|
#undef EXPLICITCASTEXPR |
||||||
|
|
||||||
|
#ifndef IMPLICITCASTEXPR |
||||||
|
# define IMPLICITCASTEXPR(Type, Base) CASTEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
IMPLICITCASTEXPR(ImplicitCastExpr, CastExpr) |
||||||
|
#undef IMPLICITCASTEXPR |
||||||
|
|
||||||
|
STMT_RANGE(CastExpr, BuiltinBitCastExpr, ImplicitCastExpr) |
||||||
|
|
||||||
|
#undef CASTEXPR |
||||||
|
|
||||||
|
#ifndef CHARACTERLITERAL |
||||||
|
# define CHARACTERLITERAL(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CHARACTERLITERAL(CharacterLiteral, Expr) |
||||||
|
#undef CHARACTERLITERAL |
||||||
|
|
||||||
|
#ifndef CHOOSEEXPR |
||||||
|
# define CHOOSEEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CHOOSEEXPR(ChooseExpr, Expr) |
||||||
|
#undef CHOOSEEXPR |
||||||
|
|
||||||
|
#ifndef COMPOUNDLITERALEXPR |
||||||
|
# define COMPOUNDLITERALEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
COMPOUNDLITERALEXPR(CompoundLiteralExpr, Expr) |
||||||
|
#undef COMPOUNDLITERALEXPR |
||||||
|
|
||||||
|
#ifndef CONVERTVECTOREXPR |
||||||
|
# define CONVERTVECTOREXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CONVERTVECTOREXPR(ConvertVectorExpr, Expr) |
||||||
|
#undef CONVERTVECTOREXPR |
||||||
|
|
||||||
|
#ifndef COROUTINESUSPENDEXPR |
||||||
|
# define COROUTINESUSPENDEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
ABSTRACT_STMT(COROUTINESUSPENDEXPR(CoroutineSuspendExpr, Expr)) |
||||||
|
#ifndef COAWAITEXPR |
||||||
|
# define COAWAITEXPR(Type, Base) COROUTINESUSPENDEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
COAWAITEXPR(CoawaitExpr, CoroutineSuspendExpr) |
||||||
|
#undef COAWAITEXPR |
||||||
|
|
||||||
|
#ifndef COYIELDEXPR |
||||||
|
# define COYIELDEXPR(Type, Base) COROUTINESUSPENDEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
COYIELDEXPR(CoyieldExpr, CoroutineSuspendExpr) |
||||||
|
#undef COYIELDEXPR |
||||||
|
|
||||||
|
STMT_RANGE(CoroutineSuspendExpr, CoawaitExpr, CoyieldExpr) |
||||||
|
|
||||||
|
#undef COROUTINESUSPENDEXPR |
||||||
|
|
||||||
|
#ifndef DECLREFEXPR |
||||||
|
# define DECLREFEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
DECLREFEXPR(DeclRefExpr, Expr) |
||||||
|
#undef DECLREFEXPR |
||||||
|
|
||||||
|
#ifndef DEPENDENTCOAWAITEXPR |
||||||
|
# define DEPENDENTCOAWAITEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
DEPENDENTCOAWAITEXPR(DependentCoawaitExpr, Expr) |
||||||
|
#undef DEPENDENTCOAWAITEXPR |
||||||
|
|
||||||
|
#ifndef DEPENDENTSCOPEDECLREFEXPR |
||||||
|
# define DEPENDENTSCOPEDECLREFEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
DEPENDENTSCOPEDECLREFEXPR(DependentScopeDeclRefExpr, Expr) |
||||||
|
#undef DEPENDENTSCOPEDECLREFEXPR |
||||||
|
|
||||||
|
#ifndef DESIGNATEDINITEXPR |
||||||
|
# define DESIGNATEDINITEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
DESIGNATEDINITEXPR(DesignatedInitExpr, Expr) |
||||||
|
#undef DESIGNATEDINITEXPR |
||||||
|
|
||||||
|
#ifndef DESIGNATEDINITUPDATEEXPR |
||||||
|
# define DESIGNATEDINITUPDATEEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
DESIGNATEDINITUPDATEEXPR(DesignatedInitUpdateExpr, Expr) |
||||||
|
#undef DESIGNATEDINITUPDATEEXPR |
||||||
|
|
||||||
|
#ifndef EXPRESSIONTRAITEXPR |
||||||
|
# define EXPRESSIONTRAITEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
EXPRESSIONTRAITEXPR(ExpressionTraitExpr, Expr) |
||||||
|
#undef EXPRESSIONTRAITEXPR |
||||||
|
|
||||||
|
#ifndef EXTVECTORELEMENTEXPR |
||||||
|
# define EXTVECTORELEMENTEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
EXTVECTORELEMENTEXPR(ExtVectorElementExpr, Expr) |
||||||
|
#undef EXTVECTORELEMENTEXPR |
||||||
|
|
||||||
|
#ifndef FIXEDPOINTLITERAL |
||||||
|
# define FIXEDPOINTLITERAL(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
FIXEDPOINTLITERAL(FixedPointLiteral, Expr) |
||||||
|
#undef FIXEDPOINTLITERAL |
||||||
|
|
||||||
|
#ifndef FLOATINGLITERAL |
||||||
|
# define FLOATINGLITERAL(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
FLOATINGLITERAL(FloatingLiteral, Expr) |
||||||
|
#undef FLOATINGLITERAL |
||||||
|
|
||||||
|
#ifndef FULLEXPR |
||||||
|
# define FULLEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
ABSTRACT_STMT(FULLEXPR(FullExpr, Expr)) |
||||||
|
#ifndef CONSTANTEXPR |
||||||
|
# define CONSTANTEXPR(Type, Base) FULLEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
CONSTANTEXPR(ConstantExpr, FullExpr) |
||||||
|
#undef CONSTANTEXPR |
||||||
|
|
||||||
|
#ifndef EXPRWITHCLEANUPS |
||||||
|
# define EXPRWITHCLEANUPS(Type, Base) FULLEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
EXPRWITHCLEANUPS(ExprWithCleanups, FullExpr) |
||||||
|
#undef EXPRWITHCLEANUPS |
||||||
|
|
||||||
|
STMT_RANGE(FullExpr, ConstantExpr, ExprWithCleanups) |
||||||
|
|
||||||
|
#undef FULLEXPR |
||||||
|
|
||||||
|
#ifndef FUNCTIONPARMPACKEXPR |
||||||
|
# define FUNCTIONPARMPACKEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
FUNCTIONPARMPACKEXPR(FunctionParmPackExpr, Expr) |
||||||
|
#undef FUNCTIONPARMPACKEXPR |
||||||
|
|
||||||
|
#ifndef GNUNULLEXPR |
||||||
|
# define GNUNULLEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
GNUNULLEXPR(GNUNullExpr, Expr) |
||||||
|
#undef GNUNULLEXPR |
||||||
|
|
||||||
|
#ifndef GENERICSELECTIONEXPR |
||||||
|
# define GENERICSELECTIONEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
GENERICSELECTIONEXPR(GenericSelectionExpr, Expr) |
||||||
|
#undef GENERICSELECTIONEXPR |
||||||
|
|
||||||
|
#ifndef IMAGINARYLITERAL |
||||||
|
# define IMAGINARYLITERAL(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
IMAGINARYLITERAL(ImaginaryLiteral, Expr) |
||||||
|
#undef IMAGINARYLITERAL |
||||||
|
|
||||||
|
#ifndef IMPLICITVALUEINITEXPR |
||||||
|
# define IMPLICITVALUEINITEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
IMPLICITVALUEINITEXPR(ImplicitValueInitExpr, Expr) |
||||||
|
#undef IMPLICITVALUEINITEXPR |
||||||
|
|
||||||
|
#ifndef INITLISTEXPR |
||||||
|
# define INITLISTEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
INITLISTEXPR(InitListExpr, Expr) |
||||||
|
#undef INITLISTEXPR |
||||||
|
|
||||||
|
#ifndef INTEGERLITERAL |
||||||
|
# define INTEGERLITERAL(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
INTEGERLITERAL(IntegerLiteral, Expr) |
||||||
|
#undef INTEGERLITERAL |
||||||
|
|
||||||
|
#ifndef LAMBDAEXPR |
||||||
|
# define LAMBDAEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
LAMBDAEXPR(LambdaExpr, Expr) |
||||||
|
#undef LAMBDAEXPR |
||||||
|
|
||||||
|
#ifndef MSPROPERTYREFEXPR |
||||||
|
# define MSPROPERTYREFEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
MSPROPERTYREFEXPR(MSPropertyRefExpr, Expr) |
||||||
|
#undef MSPROPERTYREFEXPR |
||||||
|
|
||||||
|
#ifndef MSPROPERTYSUBSCRIPTEXPR |
||||||
|
# define MSPROPERTYSUBSCRIPTEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
MSPROPERTYSUBSCRIPTEXPR(MSPropertySubscriptExpr, Expr) |
||||||
|
#undef MSPROPERTYSUBSCRIPTEXPR |
||||||
|
|
||||||
|
#ifndef MATERIALIZETEMPORARYEXPR |
||||||
|
# define MATERIALIZETEMPORARYEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
MATERIALIZETEMPORARYEXPR(MaterializeTemporaryExpr, Expr) |
||||||
|
#undef MATERIALIZETEMPORARYEXPR |
||||||
|
|
||||||
|
#ifndef MATRIXSUBSCRIPTEXPR |
||||||
|
# define MATRIXSUBSCRIPTEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
MATRIXSUBSCRIPTEXPR(MatrixSubscriptExpr, Expr) |
||||||
|
#undef MATRIXSUBSCRIPTEXPR |
||||||
|
|
||||||
|
#ifndef MEMBEREXPR |
||||||
|
# define MEMBEREXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
MEMBEREXPR(MemberExpr, Expr) |
||||||
|
#undef MEMBEREXPR |
||||||
|
|
||||||
|
#ifndef NOINITEXPR |
||||||
|
# define NOINITEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
NOINITEXPR(NoInitExpr, Expr) |
||||||
|
#undef NOINITEXPR |
||||||
|
|
||||||
|
// Removed OMP nodes |
||||||
|
// Removed OBJC nodes |
||||||
|
|
||||||
|
#ifndef OFFSETOFEXPR |
||||||
|
# define OFFSETOFEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
OFFSETOFEXPR(OffsetOfExpr, Expr) |
||||||
|
#undef OFFSETOFEXPR |
||||||
|
|
||||||
|
#ifndef OPAQUEVALUEEXPR |
||||||
|
# define OPAQUEVALUEEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
OPAQUEVALUEEXPR(OpaqueValueExpr, Expr) |
||||||
|
#undef OPAQUEVALUEEXPR |
||||||
|
|
||||||
|
#ifndef OVERLOADEXPR |
||||||
|
# define OVERLOADEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
ABSTRACT_STMT(OVERLOADEXPR(OverloadExpr, Expr)) |
||||||
|
#ifndef UNRESOLVEDLOOKUPEXPR |
||||||
|
# define UNRESOLVEDLOOKUPEXPR(Type, Base) OVERLOADEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
UNRESOLVEDLOOKUPEXPR(UnresolvedLookupExpr, OverloadExpr) |
||||||
|
#undef UNRESOLVEDLOOKUPEXPR |
||||||
|
|
||||||
|
#ifndef UNRESOLVEDMEMBEREXPR |
||||||
|
# define UNRESOLVEDMEMBEREXPR(Type, Base) OVERLOADEXPR(Type, Base) |
||||||
|
#endif |
||||||
|
UNRESOLVEDMEMBEREXPR(UnresolvedMemberExpr, OverloadExpr) |
||||||
|
#undef UNRESOLVEDMEMBEREXPR |
||||||
|
|
||||||
|
STMT_RANGE(OverloadExpr, UnresolvedLookupExpr, UnresolvedMemberExpr) |
||||||
|
|
||||||
|
#undef OVERLOADEXPR |
||||||
|
|
||||||
|
#ifndef PACKEXPANSIONEXPR |
||||||
|
# define PACKEXPANSIONEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
PACKEXPANSIONEXPR(PackExpansionExpr, Expr) |
||||||
|
#undef PACKEXPANSIONEXPR |
||||||
|
|
||||||
|
#ifndef PARENEXPR |
||||||
|
# define PARENEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
PARENEXPR(ParenExpr, Expr) |
||||||
|
#undef PARENEXPR |
||||||
|
|
||||||
|
#ifndef PARENLISTEXPR |
||||||
|
# define PARENLISTEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
PARENLISTEXPR(ParenListExpr, Expr) |
||||||
|
#undef PARENLISTEXPR |
||||||
|
|
||||||
|
#ifndef PREDEFINEDEXPR |
||||||
|
# define PREDEFINEDEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
PREDEFINEDEXPR(PredefinedExpr, Expr) |
||||||
|
#undef PREDEFINEDEXPR |
||||||
|
|
||||||
|
#ifndef PSEUDOOBJECTEXPR |
||||||
|
# define PSEUDOOBJECTEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
PSEUDOOBJECTEXPR(PseudoObjectExpr, Expr) |
||||||
|
#undef PSEUDOOBJECTEXPR |
||||||
|
|
||||||
|
#ifndef RECOVERYEXPR |
||||||
|
# define RECOVERYEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
RECOVERYEXPR(RecoveryExpr, Expr) |
||||||
|
#undef RECOVERYEXPR |
||||||
|
|
||||||
|
#ifndef SYCLUNIQUESTABLENAMEEXPR |
||||||
|
# define SYCLUNIQUESTABLENAMEEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
SYCLUNIQUESTABLENAMEEXPR(SYCLUniqueStableNameExpr, Expr) |
||||||
|
#undef SYCLUNIQUESTABLENAMEEXPR |
||||||
|
|
||||||
|
#ifndef SHUFFLEVECTOREXPR |
||||||
|
# define SHUFFLEVECTOREXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
SHUFFLEVECTOREXPR(ShuffleVectorExpr, Expr) |
||||||
|
#undef SHUFFLEVECTOREXPR |
||||||
|
|
||||||
|
#ifndef SIZEOFPACKEXPR |
||||||
|
# define SIZEOFPACKEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
SIZEOFPACKEXPR(SizeOfPackExpr, Expr) |
||||||
|
#undef SIZEOFPACKEXPR |
||||||
|
|
||||||
|
#ifndef SOURCELOCEXPR |
||||||
|
# define SOURCELOCEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
SOURCELOCEXPR(SourceLocExpr, Expr) |
||||||
|
#undef SOURCELOCEXPR |
||||||
|
|
||||||
|
#ifndef STMTEXPR |
||||||
|
# define STMTEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
STMTEXPR(StmtExpr, Expr) |
||||||
|
#undef STMTEXPR |
||||||
|
|
||||||
|
#ifndef STRINGLITERAL |
||||||
|
# define STRINGLITERAL(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
STRINGLITERAL(StringLiteral, Expr) |
||||||
|
#undef STRINGLITERAL |
||||||
|
|
||||||
|
#ifndef SUBSTNONTYPETEMPLATEPARMEXPR |
||||||
|
# define SUBSTNONTYPETEMPLATEPARMEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
SUBSTNONTYPETEMPLATEPARMEXPR(SubstNonTypeTemplateParmExpr, Expr) |
||||||
|
#undef SUBSTNONTYPETEMPLATEPARMEXPR |
||||||
|
|
||||||
|
#ifndef SUBSTNONTYPETEMPLATEPARMPACKEXPR |
||||||
|
# define SUBSTNONTYPETEMPLATEPARMPACKEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
SUBSTNONTYPETEMPLATEPARMPACKEXPR(SubstNonTypeTemplateParmPackExpr, Expr) |
||||||
|
#undef SUBSTNONTYPETEMPLATEPARMPACKEXPR |
||||||
|
|
||||||
|
#ifndef TYPETRAITEXPR |
||||||
|
# define TYPETRAITEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
TYPETRAITEXPR(TypeTraitExpr, Expr) |
||||||
|
#undef TYPETRAITEXPR |
||||||
|
|
||||||
|
#ifndef TYPOEXPR |
||||||
|
# define TYPOEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
TYPOEXPR(TypoExpr, Expr) |
||||||
|
#undef TYPOEXPR |
||||||
|
|
||||||
|
#ifndef UNARYEXPRORTYPETRAITEXPR |
||||||
|
# define UNARYEXPRORTYPETRAITEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
UNARYEXPRORTYPETRAITEXPR(UnaryExprOrTypeTraitExpr, Expr) |
||||||
|
#undef UNARYEXPRORTYPETRAITEXPR |
||||||
|
|
||||||
|
#ifndef UNARYOPERATOR |
||||||
|
# define UNARYOPERATOR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
UNARYOPERATOR(UnaryOperator, Expr) |
||||||
|
#undef UNARYOPERATOR |
||||||
|
|
||||||
|
#ifndef VAARGEXPR |
||||||
|
# define VAARGEXPR(Type, Base) EXPR(Type, Base) |
||||||
|
#endif |
||||||
|
VAARGEXPR(VAArgExpr, Expr) |
||||||
|
#undef VAARGEXPR |
||||||
|
|
||||||
|
STMT_RANGE(Expr, BinaryConditionalOperator, VAArgExpr) |
||||||
|
|
||||||
|
#undef EXPR |
||||||
|
|
||||||
|
#ifndef LABELSTMT |
||||||
|
# define LABELSTMT(Type, Base) VALUESTMT(Type, Base) |
||||||
|
#endif |
||||||
|
LABELSTMT(LabelStmt, ValueStmt) |
||||||
|
#undef LABELSTMT |
||||||
|
|
||||||
|
STMT_RANGE(ValueStmt, AttributedStmt, LabelStmt) |
||||||
|
|
||||||
|
#undef VALUESTMT |
||||||
|
|
||||||
|
#ifndef WHILESTMT |
||||||
|
# define WHILESTMT(Type, Base) STMT(Type, Base) |
||||||
|
#endif |
||||||
|
WHILESTMT(WhileStmt, Stmt) |
||||||
|
#undef WHILESTMT |
||||||
|
|
||||||
|
LAST_STMT_RANGE(Stmt, GCCAsmStmt, WhileStmt) |
||||||
|
|
||||||
|
#undef STMT |
||||||
|
#undef STMT_RANGE |
||||||
|
#undef LAST_STMT_RANGE |
||||||
|
#undef ABSTRACT_STMT |
Loading…
Reference in new issue