/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/clang/include/clang/AST/ASTTypeTraits.h
Line | Count | Source (jump to first uncovered line) |
1 | | //===--- ASTTypeTraits.h ----------------------------------------*- C++ -*-===// |
2 | | // |
3 | | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | | // See https://llvm.org/LICENSE.txt for license information. |
5 | | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | | // |
7 | | //===----------------------------------------------------------------------===// |
8 | | // |
9 | | // Provides a dynamic type identifier and a dynamically typed node container |
10 | | // that can be used to store an AST base node at runtime in the same storage in |
11 | | // a type safe way. |
12 | | // |
13 | | //===----------------------------------------------------------------------===// |
14 | | |
15 | | #ifndef LLVM_CLANG_AST_ASTTYPETRAITS_H |
16 | | #define LLVM_CLANG_AST_ASTTYPETRAITS_H |
17 | | |
18 | | #include "clang/AST/ASTFwd.h" |
19 | | #include "clang/AST/Decl.h" |
20 | | #include "clang/AST/NestedNameSpecifier.h" |
21 | | #include "clang/AST/OpenMPClause.h" |
22 | | #include "clang/AST/Stmt.h" |
23 | | #include "clang/AST/TemplateBase.h" |
24 | | #include "clang/AST/TypeLoc.h" |
25 | | #include "clang/Basic/LLVM.h" |
26 | | #include "llvm/ADT/DenseMapInfo.h" |
27 | | #include "llvm/Support/AlignOf.h" |
28 | | |
29 | | namespace llvm { |
30 | | |
31 | | class raw_ostream; |
32 | | |
33 | | } |
34 | | |
35 | | namespace clang { |
36 | | |
37 | | struct PrintingPolicy; |
38 | | |
39 | | namespace ast_type_traits { |
40 | | |
41 | | /// Defines how we descend a level in the AST when we pass |
42 | | /// through expressions. |
43 | | enum TraversalKind { |
44 | | /// Will traverse all child nodes. |
45 | | TK_AsIs, |
46 | | |
47 | | /// Will not traverse implicit casts and parentheses. |
48 | | /// Corresponds to Expr::IgnoreParenImpCasts() |
49 | | TK_IgnoreImplicitCastsAndParentheses |
50 | | }; |
51 | | |
52 | | /// Kind identifier. |
53 | | /// |
54 | | /// It can be constructed from any node kind and allows for runtime type |
55 | | /// hierarchy checks. |
56 | | /// Use getFromNodeKind<T>() to construct them. |
57 | | class ASTNodeKind { |
58 | | public: |
59 | | /// Empty identifier. It matches nothing. |
60 | 1.05M | ASTNodeKind() : KindId(NKI_None) {} |
61 | | |
62 | | /// Construct an identifier for T. |
63 | | template <class T> |
64 | 1.49M | static ASTNodeKind getFromNodeKind() { |
65 | 1.49M | return ASTNodeKind(KindToKindId<T>::Id); |
66 | 1.49M | } clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::QualType>() Line | Count | Source | 64 | 160k | static ASTNodeKind getFromNodeKind() { | 65 | 160k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 160k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::TypeLoc>() Line | Count | Source | 64 | 112k | static ASTNodeKind getFromNodeKind() { | 65 | 112k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 112k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::NestedNameSpecifierLoc>() Line | Count | Source | 64 | 39.9k | static ASTNodeKind getFromNodeKind() { | 65 | 39.9k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 39.9k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::CXXRecordDecl>() Line | Count | Source | 64 | 12.6k | static ASTNodeKind getFromNodeKind() { | 65 | 12.6k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 12.6k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::NamedDecl>() Line | Count | Source | 64 | 9.11k | static ASTNodeKind getFromNodeKind() { | 65 | 9.11k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 9.11k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::CXXMemberCallExpr>() Line | Count | Source | 64 | 1.29k | static ASTNodeKind getFromNodeKind() { | 65 | 1.29k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 1.29k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::TemplateName>() Line | Count | Source | 64 | 72 | static ASTNodeKind getFromNodeKind() { | 65 | 72 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 72 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::CallExpr>() Line | Count | Source | 64 | 29.2k | static ASTNodeKind getFromNodeKind() { | 65 | 29.2k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 29.2k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::Stmt>() Line | Count | Source | 64 | 263k | static ASTNodeKind getFromNodeKind() { | 65 | 263k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 263k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::Expr>() Line | Count | Source | 64 | 142k | static ASTNodeKind getFromNodeKind() { | 65 | 142k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 142k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::NestedNameSpecifier>() Line | Count | Source | 64 | 1.89k | static ASTNodeKind getFromNodeKind() { | 65 | 1.89k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 1.89k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::CXXCtorInitializer>() Line | Count | Source | 64 | 832 | static ASTNodeKind getFromNodeKind() { | 65 | 832 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 832 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::FunctionDecl>() Line | Count | Source | 64 | 11.1k | static ASTNodeKind getFromNodeKind() { | 65 | 11.1k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 11.1k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::LambdaExpr>() Line | Count | Source | 64 | 385 | static ASTNodeKind getFromNodeKind() { | 65 | 385 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 385 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::Type>() Line | Count | Source | 64 | 27.2k | static ASTNodeKind getFromNodeKind() { | 65 | 27.2k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 27.2k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::Decl>() Line | Count | Source | 64 | 231k | static ASTNodeKind getFromNodeKind() { | 65 | 231k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 231k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::FieldDecl>() Line | Count | Source | 64 | 595 | static ASTNodeKind getFromNodeKind() { | 65 | 595 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 595 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::TemplateArgument>() Line | Count | Source | 64 | 335 | static ASTNodeKind getFromNodeKind() { | 65 | 335 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 335 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::InitListExpr>() Line | Count | Source | 64 | 16.3k | static ASTNodeKind getFromNodeKind() { | 65 | 16.3k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 16.3k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::ForStmt>() Line | Count | Source | 64 | 1.47k | static ASTNodeKind getFromNodeKind() { | 65 | 1.47k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 1.47k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::CXXForRangeStmt>() Line | Count | Source | 64 | 889 | static ASTNodeKind getFromNodeKind() { | 65 | 889 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 889 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::UnaryExprOrTypeTraitExpr>() Line | Count | Source | 64 | 2.56k | static ASTNodeKind getFromNodeKind() { | 65 | 2.56k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 2.56k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::ObjCMessageExpr>() Line | Count | Source | 64 | 9.26k | static ASTNodeKind getFromNodeKind() { | 65 | 9.26k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 9.26k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::ObjCMethodDecl>() Line | Count | Source | 64 | 1.04k | static ASTNodeKind getFromNodeKind() { | 65 | 1.04k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 1.04k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::DeclRefExpr>() Line | Count | Source | 64 | 66.5k | static ASTNodeKind getFromNodeKind() { | 65 | 66.5k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 66.5k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::DeclStmt>() Line | Count | Source | 64 | 18.2k | static ASTNodeKind getFromNodeKind() { | 65 | 18.2k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 18.2k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::VarDecl>() Line | Count | Source | 64 | 120k | static ASTNodeKind getFromNodeKind() { | 65 | 120k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 120k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::CXXConstructorDecl>() Line | Count | Source | 64 | 5.53k | static ASTNodeKind getFromNodeKind() { | 65 | 5.53k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 5.53k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::CXXConstructExpr>() Line | Count | Source | 64 | 2.72k | static ASTNodeKind getFromNodeKind() { | 65 | 2.72k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 2.72k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::CXXMethodDecl>() Line | Count | Source | 64 | 13.2k | static ASTNodeKind getFromNodeKind() { | 65 | 13.2k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 13.2k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::CXXOperatorCallExpr>() Line | Count | Source | 64 | 5.17k | static ASTNodeKind getFromNodeKind() { | 65 | 5.17k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 5.17k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::IfStmt>() Line | Count | Source | 64 | 1.67k | static ASTNodeKind getFromNodeKind() { | 65 | 1.67k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 1.67k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::ArraySubscriptExpr>() Line | Count | Source | 64 | 830 | static ASTNodeKind getFromNodeKind() { | 65 | 830 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 830 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::CompoundStmt>() Line | Count | Source | 64 | 1.89k | static ASTNodeKind getFromNodeKind() { | 65 | 1.89k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 1.89k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::BinaryOperator>() Line | Count | Source | 64 | 15.0k | static ASTNodeKind getFromNodeKind() { | 65 | 15.0k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 15.0k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::UnaryOperator>() Line | Count | Source | 64 | 72.3k | static ASTNodeKind getFromNodeKind() { | 65 | 72.3k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 72.3k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::CastExpr>() Line | Count | Source | 64 | 3.33k | static ASTNodeKind getFromNodeKind() { | 65 | 3.33k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 3.33k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::ExplicitCastExpr>() Line | Count | Source | 64 | 2.07k | static ASTNodeKind getFromNodeKind() { | 65 | 2.07k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 2.07k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::ImplicitCastExpr>() Line | Count | Source | 64 | 554 | static ASTNodeKind getFromNodeKind() { | 65 | 554 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 554 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::RecordDecl>() Line | Count | Source | 64 | 878 | static ASTNodeKind getFromNodeKind() { | 65 | 878 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 878 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::AbstractConditionalOperator>() Line | Count | Source | 64 | 842 | static ASTNodeKind getFromNodeKind() { | 65 | 842 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 842 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::MemberExpr>() Line | Count | Source | 64 | 430 | static ASTNodeKind getFromNodeKind() { | 65 | 430 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 430 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::VariableArrayType>() Line | Count | Source | 64 | 609 | static ASTNodeKind getFromNodeKind() { | 65 | 609 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 609 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::SwitchStmt>() Line | Count | Source | 64 | 467 | static ASTNodeKind getFromNodeKind() { | 65 | 467 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 467 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::ReturnStmt>() Line | Count | Source | 64 | 686 | static ASTNodeKind getFromNodeKind() { | 65 | 686 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 686 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::PointerType>() Line | Count | Source | 64 | 859 | static ASTNodeKind getFromNodeKind() { | 65 | 859 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 859 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::IntegerLiteral>() Line | Count | Source | 64 | 1.64k | static ASTNodeKind getFromNodeKind() { | 65 | 1.64k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 1.64k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::ParmVarDecl>() Line | Count | Source | 64 | 34.0k | static ASTNodeKind getFromNodeKind() { | 65 | 34.0k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 34.0k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::BlockPointerType>() Line | Count | Source | 64 | 807 | static ASTNodeKind getFromNodeKind() { | 65 | 807 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 807 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::TypedefType>() Line | Count | Source | 64 | 762 | static ASTNodeKind getFromNodeKind() { | 65 | 762 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 762 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::TypedefDecl>() Line | Count | Source | 64 | 985 | static ASTNodeKind getFromNodeKind() { | 65 | 985 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 985 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::RecordType>() Line | Count | Source | 64 | 306 | static ASTNodeKind getFromNodeKind() { | 65 | 306 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 306 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::ObjCObjectPointerType>() Line | Count | Source | 64 | 708 | static ASTNodeKind getFromNodeKind() { | 65 | 708 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 708 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::ObjCInterfaceDecl>() Line | Count | Source | 64 | 275 | static ASTNodeKind getFromNodeKind() { | 65 | 275 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 275 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::ConditionalOperator>() Line | Count | Source | 64 | 2.76k | static ASTNodeKind getFromNodeKind() { | 65 | 2.76k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 2.76k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::BlockDecl>() Line | Count | Source | 64 | 957 | static ASTNodeKind getFromNodeKind() { | 65 | 957 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 957 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::CStyleCastExpr>() Line | Count | Source | 64 | 100 | static ASTNodeKind getFromNodeKind() { | 65 | 100 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 100 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::ObjCAutoreleasePoolStmt>() Line | Count | Source | 64 | 1.57k | static ASTNodeKind getFromNodeKind() { | 65 | 1.57k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 1.57k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::ObjCIvarRefExpr>() Line | Count | Source | 64 | 82 | static ASTNodeKind getFromNodeKind() { | 65 | 82 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 82 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::GotoStmt>() Line | Count | Source | 64 | 375 | static ASTNodeKind getFromNodeKind() { | 65 | 375 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 375 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::ReferenceType>() Line | Count | Source | 64 | 33.6k | static ASTNodeKind getFromNodeKind() { | 65 | 33.6k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 33.6k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::CXXTypeidExpr>() Line | Count | Source | 64 | 823 | static ASTNodeKind getFromNodeKind() { | 65 | 823 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 823 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::GenericSelectionExpr>() Line | Count | Source | 64 | 269 | static ASTNodeKind getFromNodeKind() { | 65 | 269 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 269 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::CXXNoexceptExpr>() Line | Count | Source | 64 | 538 | static ASTNodeKind getFromNodeKind() { | 65 | 538 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 538 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::UnresolvedMemberExpr>() Line | Count | Source | 64 | 891 | static ASTNodeKind getFromNodeKind() { | 65 | 891 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 891 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::CXXDependentScopeMemberExpr>() Line | Count | Source | 64 | 1.07k | static ASTNodeKind getFromNodeKind() { | 65 | 1.07k | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 1.07k | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::UnresolvedLookupExpr>() Line | Count | Source | 64 | 583 | static ASTNodeKind getFromNodeKind() { | 65 | 583 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 583 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::TemplateTypeParmType>() Line | Count | Source | 64 | 591 | static ASTNodeKind getFromNodeKind() { | 65 | 591 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 591 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::CXXUnresolvedConstructExpr>() Line | Count | Source | 64 | 347 | static ASTNodeKind getFromNodeKind() { | 65 | 347 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 347 | } |
clang::ast_type_traits::ASTNodeKind clang::ast_type_traits::ASTNodeKind::getFromNodeKind<clang::OMPClause>() Line | Count | Source | 64 | 50 | static ASTNodeKind getFromNodeKind() { | 65 | 50 | return ASTNodeKind(KindToKindId<T>::Id); | 66 | 50 | } |
|
67 | | |
68 | | /// \{ |
69 | | /// Construct an identifier for the dynamic type of the node |
70 | | static ASTNodeKind getFromNode(const Decl &D); |
71 | | static ASTNodeKind getFromNode(const Stmt &S); |
72 | | static ASTNodeKind getFromNode(const Type &T); |
73 | | static ASTNodeKind getFromNode(const OMPClause &C); |
74 | | /// \} |
75 | | |
76 | | /// Returns \c true if \c this and \c Other represent the same kind. |
77 | 321k | bool isSame(ASTNodeKind Other) const { |
78 | 321k | return KindId != NKI_None && KindId == Other.KindId321k ; |
79 | 321k | } |
80 | | |
81 | | /// Returns \c true only for the default \c ASTNodeKind() |
82 | | bool isNone() const { return KindId == NKI_None; } |
83 | | |
84 | | /// Returns \c true if \c this is a base kind of (or same as) \c Other. |
85 | | /// \param Distance If non-null, used to return the distance between \c this |
86 | | /// and \c Other in the class hierarchy. |
87 | | bool isBaseOf(ASTNodeKind Other, unsigned *Distance = nullptr) const; |
88 | | |
89 | | /// String representation of the kind. |
90 | | StringRef asStringRef() const; |
91 | | |
92 | | /// Strict weak ordering for ASTNodeKind. |
93 | 226k | bool operator<(const ASTNodeKind &Other) const { |
94 | 226k | return KindId < Other.KindId; |
95 | 226k | } |
96 | | |
97 | | /// Return the most derived type between \p Kind1 and \p Kind2. |
98 | | /// |
99 | | /// Return ASTNodeKind() if they are not related. |
100 | | static ASTNodeKind getMostDerivedType(ASTNodeKind Kind1, ASTNodeKind Kind2); |
101 | | |
102 | | /// Return the most derived common ancestor between Kind1 and Kind2. |
103 | | /// |
104 | | /// Return ASTNodeKind() if they are not related. |
105 | | static ASTNodeKind getMostDerivedCommonAncestor(ASTNodeKind Kind1, |
106 | | ASTNodeKind Kind2); |
107 | | |
108 | | /// Hooks for using ASTNodeKind as a key in a DenseMap. |
109 | | struct DenseMapInfo { |
110 | | // ASTNodeKind() is a good empty key because it is represented as a 0. |
111 | 559k | static inline ASTNodeKind getEmptyKey() { return ASTNodeKind(); } |
112 | | // NKI_NumberOfKinds is not a valid value, so it is good for a |
113 | | // tombstone key. |
114 | 450k | static inline ASTNodeKind getTombstoneKey() { |
115 | 450k | return ASTNodeKind(NKI_NumberOfKinds); |
116 | 450k | } |
117 | 161k | static unsigned getHashValue(const ASTNodeKind &Val) { return Val.KindId; } |
118 | 2.58M | static bool isEqual(const ASTNodeKind &LHS, const ASTNodeKind &RHS) { |
119 | 2.58M | return LHS.KindId == RHS.KindId; |
120 | 2.58M | } |
121 | | }; |
122 | | |
123 | | /// Check if the given ASTNodeKind identifies a type that offers pointer |
124 | | /// identity. This is useful for the fast path in DynTypedNode. |
125 | 65.0k | bool hasPointerIdentity() const { |
126 | 65.0k | return KindId > NKI_LastKindWithoutPointerIdentity; |
127 | 65.0k | } |
128 | | |
129 | | private: |
130 | | /// Kind ids. |
131 | | /// |
132 | | /// Includes all possible base and derived kinds. |
133 | | enum NodeKindId { |
134 | | NKI_None, |
135 | | NKI_TemplateArgument, |
136 | | NKI_TemplateName, |
137 | | NKI_NestedNameSpecifierLoc, |
138 | | NKI_QualType, |
139 | | NKI_TypeLoc, |
140 | | NKI_LastKindWithoutPointerIdentity = NKI_TypeLoc, |
141 | | NKI_CXXCtorInitializer, |
142 | | NKI_NestedNameSpecifier, |
143 | | NKI_Decl, |
144 | | #define DECL(DERIVED, BASE) NKI_##DERIVED##Decl, |
145 | | #include "clang/AST/DeclNodes.inc" |
146 | | NKI_Stmt, |
147 | | #define STMT(DERIVED, BASE) NKI_##DERIVED, |
148 | | #include "clang/AST/StmtNodes.inc" |
149 | | NKI_Type, |
150 | | #define TYPE(DERIVED, BASE) NKI_##DERIVED##Type, |
151 | | #include "clang/AST/TypeNodes.def" |
152 | | NKI_OMPClause, |
153 | | #define OPENMP_CLAUSE(TextualSpelling, Class) NKI_##Class, |
154 | | #include "clang/Basic/OpenMPKinds.def" |
155 | | NKI_NumberOfKinds |
156 | | }; |
157 | | |
158 | | /// Use getFromNodeKind<T>() to construct the kind. |
159 | 2.23M | ASTNodeKind(NodeKindId KindId) : KindId(KindId) {} |
160 | | |
161 | | /// Returns \c true if \c Base is a base kind of (or same as) \c |
162 | | /// Derived. |
163 | | /// \param Distance If non-null, used to return the distance between \c Base |
164 | | /// and \c Derived in the class hierarchy. |
165 | | static bool isBaseOf(NodeKindId Base, NodeKindId Derived, unsigned *Distance); |
166 | | |
167 | | /// Helper meta-function to convert a kind T to its enum value. |
168 | | /// |
169 | | /// This struct is specialized below for all known kinds. |
170 | | template <class T> struct KindToKindId { |
171 | | static const NodeKindId Id = NKI_None; |
172 | | }; |
173 | | template <class T> |
174 | | struct KindToKindId<const T> : KindToKindId<T> {}; |
175 | | |
176 | | /// Per kind info. |
177 | | struct KindInfo { |
178 | | /// The id of the parent kind, or None if it has no parent. |
179 | | NodeKindId ParentId; |
180 | | /// Name of the kind. |
181 | | const char *Name; |
182 | | }; |
183 | | static const KindInfo AllKindInfo[NKI_NumberOfKinds]; |
184 | | |
185 | | NodeKindId KindId; |
186 | | }; |
187 | | |
188 | | #define KIND_TO_KIND_ID(Class) \ |
189 | | template <> struct ASTNodeKind::KindToKindId<Class> { \ |
190 | | static const NodeKindId Id = NKI_##Class; \ |
191 | | }; |
192 | | KIND_TO_KIND_ID(CXXCtorInitializer) |
193 | | KIND_TO_KIND_ID(TemplateArgument) |
194 | | KIND_TO_KIND_ID(TemplateName) |
195 | | KIND_TO_KIND_ID(NestedNameSpecifier) |
196 | | KIND_TO_KIND_ID(NestedNameSpecifierLoc) |
197 | | KIND_TO_KIND_ID(QualType) |
198 | | KIND_TO_KIND_ID(TypeLoc) |
199 | | KIND_TO_KIND_ID(Decl) |
200 | | KIND_TO_KIND_ID(Stmt) |
201 | | KIND_TO_KIND_ID(Type) |
202 | | KIND_TO_KIND_ID(OMPClause) |
203 | | #define DECL(DERIVED, BASE) KIND_TO_KIND_ID(DERIVED##Decl) |
204 | | #include "clang/AST/DeclNodes.inc" |
205 | | #define STMT(DERIVED, BASE) KIND_TO_KIND_ID(DERIVED) |
206 | | #include "clang/AST/StmtNodes.inc" |
207 | | #define TYPE(DERIVED, BASE) KIND_TO_KIND_ID(DERIVED##Type) |
208 | | #include "clang/AST/TypeNodes.def" |
209 | | #define OPENMP_CLAUSE(TextualSpelling, Class) KIND_TO_KIND_ID(Class) |
210 | | #include "clang/Basic/OpenMPKinds.def" |
211 | | #undef KIND_TO_KIND_ID |
212 | | |
213 | | inline raw_ostream &operator<<(raw_ostream &OS, ASTNodeKind K) { |
214 | | OS << K.asStringRef(); |
215 | | return OS; |
216 | | } |
217 | | |
218 | | /// A dynamically typed AST node container. |
219 | | /// |
220 | | /// Stores an AST node in a type safe way. This allows writing code that |
221 | | /// works with different kinds of AST nodes, despite the fact that they don't |
222 | | /// have a common base class. |
223 | | /// |
224 | | /// Use \c create(Node) to create a \c DynTypedNode from an AST node, |
225 | | /// and \c get<T>() to retrieve the node as type T if the types match. |
226 | | /// |
227 | | /// See \c ASTNodeKind for which node base types are currently supported; |
228 | | /// You can create DynTypedNodes for all nodes in the inheritance hierarchy of |
229 | | /// the supported base types. |
230 | | class DynTypedNode { |
231 | | public: |
232 | | /// Creates a \c DynTypedNode from \c Node. |
233 | | template <typename T> |
234 | 356k | static DynTypedNode create(const T &Node) { |
235 | 356k | return BaseConverter<T>::create(Node); |
236 | 356k | } clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::Expr>(clang::Expr const&) Line | Count | Source | 234 | 8.00k | static DynTypedNode create(const T &Node) { | 235 | 8.00k | return BaseConverter<T>::create(Node); | 236 | 8.00k | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::ClassTemplateDecl>(clang::ClassTemplateDecl const&) Line | Count | Source | 234 | 102 | static DynTypedNode create(const T &Node) { | 235 | 102 | return BaseConverter<T>::create(Node); | 236 | 102 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::QualType>(clang::QualType const&) Line | Count | Source | 234 | 22.2k | static DynTypedNode create(const T &Node) { | 235 | 22.2k | return BaseConverter<T>::create(Node); | 236 | 22.2k | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::TemplateName>(clang::TemplateName const&) Line | Count | Source | 234 | 2 | static DynTypedNode create(const T &Node) { | 235 | 2 | return BaseConverter<T>::create(Node); | 236 | 2 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::Decl>(clang::Decl const&) Line | Count | Source | 234 | 117k | static DynTypedNode create(const T &Node) { | 235 | 117k | return BaseConverter<T>::create(Node); | 236 | 117k | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::Stmt>(clang::Stmt const&) Line | Count | Source | 234 | 124k | static DynTypedNode create(const T &Node) { | 235 | 124k | return BaseConverter<T>::create(Node); | 236 | 124k | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::VarDecl>(clang::VarDecl const&) Line | Count | Source | 234 | 557 | static DynTypedNode create(const T &Node) { | 235 | 557 | return BaseConverter<T>::create(Node); | 236 | 557 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::CXXRecordDecl>(clang::CXXRecordDecl const&) Line | Count | Source | 234 | 2.21k | static DynTypedNode create(const T &Node) { | 235 | 2.21k | return BaseConverter<T>::create(Node); | 236 | 2.21k | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::NamedDecl>(clang::NamedDecl const&) Line | Count | Source | 234 | 602 | static DynTypedNode create(const T &Node) { | 235 | 602 | return BaseConverter<T>::create(Node); | 236 | 602 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::TypeLoc>(clang::TypeLoc const&) Line | Count | Source | 234 | 45.1k | static DynTypedNode create(const T &Node) { | 235 | 45.1k | return BaseConverter<T>::create(Node); | 236 | 45.1k | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::Type>(clang::Type const&) Line | Count | Source | 234 | 19.4k | static DynTypedNode create(const T &Node) { | 235 | 19.4k | return BaseConverter<T>::create(Node); | 236 | 19.4k | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::CXXMemberCallExpr>(clang::CXXMemberCallExpr const&) Line | Count | Source | 234 | 18 | static DynTypedNode create(const T &Node) { | 235 | 18 | return BaseConverter<T>::create(Node); | 236 | 18 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::UsingShadowDecl>(clang::UsingShadowDecl const&) Line | Count | Source | 234 | 12 | static DynTypedNode create(const T &Node) { | 235 | 12 | return BaseConverter<T>::create(Node); | 236 | 12 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::FieldDecl>(clang::FieldDecl const&) Line | Count | Source | 234 | 74 | static DynTypedNode create(const T &Node) { | 235 | 74 | return BaseConverter<T>::create(Node); | 236 | 74 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::DeclStmt>(clang::DeclStmt const&) Line | Count | Source | 234 | 129 | static DynTypedNode create(const T &Node) { | 235 | 129 | return BaseConverter<T>::create(Node); | 236 | 129 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::CXXMethodDecl>(clang::CXXMethodDecl const&) Line | Count | Source | 234 | 524 | static DynTypedNode create(const T &Node) { | 235 | 524 | return BaseConverter<T>::create(Node); | 236 | 524 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::ValueDecl>(clang::ValueDecl const&) Line | Count | Source | 234 | 19 | static DynTypedNode create(const T &Node) { | 235 | 19 | return BaseConverter<T>::create(Node); | 236 | 19 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::NestedNameSpecifier>(clang::NestedNameSpecifier const&) Line | Count | Source | 234 | 591 | static DynTypedNode create(const T &Node) { | 235 | 591 | return BaseConverter<T>::create(Node); | 236 | 591 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::NestedNameSpecifierLoc>(clang::NestedNameSpecifierLoc const&) Line | Count | Source | 234 | 13.0k | static DynTypedNode create(const T &Node) { | 235 | 13.0k | return BaseConverter<T>::create(Node); | 236 | 13.0k | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::NamespaceDecl>(clang::NamespaceDecl const&) Line | Count | Source | 234 | 36 | static DynTypedNode create(const T &Node) { | 235 | 36 | return BaseConverter<T>::create(Node); | 236 | 36 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::SwitchCase>(clang::SwitchCase const&) Line | Count | Source | 234 | 23 | static DynTypedNode create(const T &Node) { | 235 | 23 | return BaseConverter<T>::create(Node); | 236 | 23 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::CXXCtorInitializer>(clang::CXXCtorInitializer const&) Line | Count | Source | 234 | 192 | static DynTypedNode create(const T &Node) { | 235 | 192 | return BaseConverter<T>::create(Node); | 236 | 192 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::FunctionDecl>(clang::FunctionDecl const&) Line | Count | Source | 234 | 418 | static DynTypedNode create(const T &Node) { | 235 | 418 | return BaseConverter<T>::create(Node); | 236 | 418 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::OMPClause>(clang::OMPClause const&) Line | Count | Source | 234 | 24 | static DynTypedNode create(const T &Node) { | 235 | 24 | return BaseConverter<T>::create(Node); | 236 | 24 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::CompoundStmt>(clang::CompoundStmt const&) Line | Count | Source | 234 | 431 | static DynTypedNode create(const T &Node) { | 235 | 431 | return BaseConverter<T>::create(Node); | 236 | 431 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::UnaryOperator>(clang::UnaryOperator const&) Line | Count | Source | 234 | 21 | static DynTypedNode create(const T &Node) { | 235 | 21 | return BaseConverter<T>::create(Node); | 236 | 21 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::ExplicitCastExpr>(clang::ExplicitCastExpr const&) Line | Count | Source | 234 | 110 | static DynTypedNode create(const T &Node) { | 235 | 110 | return BaseConverter<T>::create(Node); | 236 | 110 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::ParmVarDecl>(clang::ParmVarDecl const&) Line | Count | Source | 234 | 452 | static DynTypedNode create(const T &Node) { | 235 | 452 | return BaseConverter<T>::create(Node); | 236 | 452 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::ObjCMethodDecl>(clang::ObjCMethodDecl const&) Line | Count | Source | 234 | 6 | static DynTypedNode create(const T &Node) { | 235 | 6 | return BaseConverter<T>::create(Node); | 236 | 6 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::BlockDecl>(clang::BlockDecl const&) Line | Count | Source | 234 | 1 | static DynTypedNode create(const T &Node) { | 235 | 1 | return BaseConverter<T>::create(Node); | 236 | 1 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::ObjCMessageExpr>(clang::ObjCMessageExpr const&) Line | Count | Source | 234 | 35 | static DynTypedNode create(const T &Node) { | 235 | 35 | return BaseConverter<T>::create(Node); | 236 | 35 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::ObjCAutoreleasePoolStmt>(clang::ObjCAutoreleasePoolStmt const&) Line | Count | Source | 234 | 19 | static DynTypedNode create(const T &Node) { | 235 | 19 | return BaseConverter<T>::create(Node); | 236 | 19 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::InitListExpr>(clang::InitListExpr const&) Line | Count | Source | 234 | 135 | static DynTypedNode create(const T &Node) { | 235 | 135 | return BaseConverter<T>::create(Node); | 236 | 135 | } |
clang::ast_type_traits::DynTypedNode clang::ast_type_traits::DynTypedNode::create<clang::CastExpr>(clang::CastExpr const&) Line | Count | Source | 234 | 62 | static DynTypedNode create(const T &Node) { | 235 | 62 | return BaseConverter<T>::create(Node); | 236 | 62 | } |
|
237 | | |
238 | | /// Retrieve the stored node as type \c T. |
239 | | /// |
240 | | /// Returns NULL if the stored node does not have a type that is |
241 | | /// convertible to \c T. |
242 | | /// |
243 | | /// For types that have identity via their pointer in the AST |
244 | | /// (like \c Stmt, \c Decl, \c Type and \c NestedNameSpecifier) the returned |
245 | | /// pointer points to the referenced AST node. |
246 | | /// For other types (like \c QualType) the value is stored directly |
247 | | /// in the \c DynTypedNode, and the returned pointer points at |
248 | | /// the storage inside DynTypedNode. For those nodes, do not |
249 | | /// use the pointer outside the scope of the DynTypedNode. |
250 | | template <typename T> |
251 | 123k | const T *get() const { |
252 | 123k | return BaseConverter<T>::get(NodeKind, Storage.buffer); |
253 | 123k | } clang::FunctionDecl const* clang::ast_type_traits::DynTypedNode::get<clang::FunctionDecl>() const Line | Count | Source | 251 | 1.43k | const T *get() const { | 252 | 1.43k | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 1.43k | } |
clang::LambdaExpr const* clang::ast_type_traits::DynTypedNode::get<clang::LambdaExpr>() const Line | Count | Source | 251 | 32 | const T *get() const { | 252 | 32 | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 32 | } |
clang::CallExpr const* clang::ast_type_traits::DynTypedNode::get<clang::CallExpr>() const Line | Count | Source | 251 | 49 | const T *get() const { | 252 | 49 | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 49 | } |
clang::Stmt const* clang::ast_type_traits::DynTypedNode::get<clang::Stmt>() const Line | Count | Source | 251 | 40.6k | const T *get() const { | 252 | 40.6k | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 40.6k | } |
clang::Expr const* clang::ast_type_traits::DynTypedNode::get<clang::Expr>() const Line | Count | Source | 251 | 558 | const T *get() const { | 252 | 558 | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 558 | } |
clang::Decl const* clang::ast_type_traits::DynTypedNode::get<clang::Decl>() const Line | Count | Source | 251 | 68.0k | const T *get() const { | 252 | 68.0k | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 68.0k | } |
clang::QualType const* clang::ast_type_traits::DynTypedNode::get<clang::QualType>() const Line | Count | Source | 251 | 200 | const T *get() const { | 252 | 200 | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 200 | } |
clang::ParmVarDecl const* clang::ast_type_traits::DynTypedNode::get<clang::ParmVarDecl>() const Line | Count | Source | 251 | 82 | const T *get() const { | 252 | 82 | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 82 | } |
clang::ObjCMethodDecl const* clang::ast_type_traits::DynTypedNode::get<clang::ObjCMethodDecl>() const Line | Count | Source | 251 | 5 | const T *get() const { | 252 | 5 | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 5 | } |
clang::CastExpr const* clang::ast_type_traits::DynTypedNode::get<clang::CastExpr>() const Line | Count | Source | 251 | 1 | const T *get() const { | 252 | 1 | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 1 | } |
clang::ObjCMessageExpr const* clang::ast_type_traits::DynTypedNode::get<clang::ObjCMessageExpr>() const Line | Count | Source | 251 | 18 | const T *get() const { | 252 | 18 | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 18 | } |
clang::ObjCAutoreleasePoolStmt const* clang::ast_type_traits::DynTypedNode::get<clang::ObjCAutoreleasePoolStmt>() const Line | Count | Source | 251 | 12 | const T *get() const { | 252 | 12 | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 12 | } |
clang::MemberExpr const* clang::ast_type_traits::DynTypedNode::get<clang::MemberExpr>() const Line | Count | Source | 251 | 27 | const T *get() const { | 252 | 27 | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 27 | } |
clang::ObjCIvarRefExpr const* clang::ast_type_traits::DynTypedNode::get<clang::ObjCIvarRefExpr>() const Line | Count | Source | 251 | 2 | const T *get() const { | 252 | 2 | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 2 | } |
clang::VarDecl const* clang::ast_type_traits::DynTypedNode::get<clang::VarDecl>() const Line | Count | Source | 251 | 747 | const T *get() const { | 252 | 747 | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 747 | } |
clang::IntegerLiteral const* clang::ast_type_traits::DynTypedNode::get<clang::IntegerLiteral>() const Line | Count | Source | 251 | 240 | const T *get() const { | 252 | 240 | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 240 | } |
clang::BinaryOperator const* clang::ast_type_traits::DynTypedNode::get<clang::BinaryOperator>() const Line | Count | Source | 251 | 112 | const T *get() const { | 252 | 112 | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 112 | } |
clang::NestedNameSpecifier const* clang::ast_type_traits::DynTypedNode::get<clang::NestedNameSpecifier>() const Line | Count | Source | 251 | 175 | const T *get() const { | 252 | 175 | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 175 | } |
clang::NestedNameSpecifierLoc const* clang::ast_type_traits::DynTypedNode::get<clang::NestedNameSpecifierLoc>() const Line | Count | Source | 251 | 5.52k | const T *get() const { | 252 | 5.52k | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 5.52k | } |
clang::TypeLoc const* clang::ast_type_traits::DynTypedNode::get<clang::TypeLoc>() const Line | Count | Source | 251 | 5.43k | const T *get() const { | 252 | 5.43k | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 5.43k | } |
clang::CXXCtorInitializer const* clang::ast_type_traits::DynTypedNode::get<clang::CXXCtorInitializer>() const Line | Count | Source | 251 | 260 | const T *get() const { | 252 | 260 | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 260 | } |
clang::Type const* clang::ast_type_traits::DynTypedNode::get<clang::Type>() const Line | Count | Source | 251 | 18 | const T *get() const { | 252 | 18 | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 18 | } |
clang::TemplateArgument const* clang::ast_type_traits::DynTypedNode::get<clang::TemplateArgument>() const Line | Count | Source | 251 | 3 | const T *get() const { | 252 | 3 | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 3 | } |
clang::TemplateName const* clang::ast_type_traits::DynTypedNode::get<clang::TemplateName>() const Line | Count | Source | 251 | 2 | const T *get() const { | 252 | 2 | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 2 | } |
clang::OMPClause const* clang::ast_type_traits::DynTypedNode::get<clang::OMPClause>() const Line | Count | Source | 251 | 1 | const T *get() const { | 252 | 1 | return BaseConverter<T>::get(NodeKind, Storage.buffer); | 253 | 1 | } |
|
254 | | |
255 | | /// Retrieve the stored node as type \c T. |
256 | | /// |
257 | | /// Similar to \c get(), but asserts that the type is what we are expecting. |
258 | | template <typename T> |
259 | 137k | const T &getUnchecked() const { |
260 | 137k | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); |
261 | 137k | } clang::QualType const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::QualType>() const Line | Count | Source | 259 | 10.9k | const T &getUnchecked() const { | 260 | 10.9k | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 10.9k | } |
clang::TypeLoc const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::TypeLoc>() const Line | Count | Source | 259 | 56.5k | const T &getUnchecked() const { | 260 | 56.5k | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 56.5k | } |
clang::NestedNameSpecifierLoc const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::NestedNameSpecifierLoc>() const Line | Count | Source | 259 | 1.25k | const T &getUnchecked() const { | 260 | 1.25k | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 1.25k | } |
clang::Decl const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::Decl>() const Line | Count | Source | 259 | 3.06k | const T &getUnchecked() const { | 260 | 3.06k | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 3.06k | } |
clang::FieldDecl const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::FieldDecl>() const Line | Count | Source | 259 | 116 | const T &getUnchecked() const { | 260 | 116 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 116 | } |
clang::FunctionDecl const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::FunctionDecl>() const Line | Count | Source | 259 | 2.20k | const T &getUnchecked() const { | 260 | 2.20k | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 2.20k | } |
clang::ClassTemplateSpecializationDecl const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::ClassTemplateSpecializationDecl>() const Line | Count | Source | 259 | 78 | const T &getUnchecked() const { | 260 | 78 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 78 | } |
clang::Expr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::Expr>() const Line | Count | Source | 259 | 6.52k | const T &getUnchecked() const { | 260 | 6.52k | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 6.52k | } |
clang::TemplateArgument const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::TemplateArgument>() const Line | Count | Source | 259 | 46 | const T &getUnchecked() const { | 260 | 46 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 46 | } |
clang::CallExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::CallExpr>() const Line | Count | Source | 259 | 4.56k | const T &getUnchecked() const { | 260 | 4.56k | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 4.56k | } |
clang::InitListExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::InitListExpr>() const Line | Count | Source | 259 | 184 | const T &getUnchecked() const { | 260 | 184 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 184 | } |
clang::ForStmt const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::ForStmt>() const Line | Count | Source | 259 | 624 | const T &getUnchecked() const { | 260 | 624 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 624 | } |
clang::CXXForRangeStmt const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::CXXForRangeStmt>() const Line | Count | Source | 259 | 42 | const T &getUnchecked() const { | 260 | 42 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 42 | } |
clang::DesignatedInitExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::DesignatedInitExpr>() const Line | Count | Source | 259 | 144 | const T &getUnchecked() const { | 260 | 144 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 144 | } |
clang::UnaryExprOrTypeTraitExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::UnaryExprOrTypeTraitExpr>() const Line | Count | Source | 259 | 27 | const T &getUnchecked() const { | 260 | 27 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 27 | } |
clang::NamedDecl const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::NamedDecl>() const Line | Count | Source | 259 | 17.3k | const T &getUnchecked() const { | 260 | 17.3k | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 17.3k | } |
clang::CXXRecordDecl const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::CXXRecordDecl>() const Line | Count | Source | 259 | 3.26k | const T &getUnchecked() const { | 260 | 3.26k | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 3.26k | } |
clang::CXXMemberCallExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::CXXMemberCallExpr>() const Line | Count | Source | 259 | 117 | const T &getUnchecked() const { | 260 | 117 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 117 | } |
clang::ObjCMessageExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::ObjCMessageExpr>() const Line | Count | Source | 259 | 246 | const T &getUnchecked() const { | 260 | 246 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 246 | } |
clang::ObjCMethodDecl const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::ObjCMethodDecl>() const Line | Count | Source | 259 | 58 | const T &getUnchecked() const { | 260 | 58 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 58 | } |
clang::DeclaratorDecl const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::DeclaratorDecl>() const Line | Count | Source | 259 | 28 | const T &getUnchecked() const { | 260 | 28 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 28 | } |
clang::Type const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::Type>() const Line | Count | Source | 259 | 1.29k | const T &getUnchecked() const { | 260 | 1.29k | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 1.29k | } |
clang::DeclRefExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::DeclRefExpr>() const Line | Count | Source | 259 | 1.38k | const T &getUnchecked() const { | 260 | 1.38k | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 1.38k | } |
clang::OverloadExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::OverloadExpr>() const Line | Count | Source | 259 | 14 | const T &getUnchecked() const { | 260 | 14 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 14 | } |
clang::DeclStmt const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::DeclStmt>() const Line | Count | Source | 259 | 429 | const T &getUnchecked() const { | 260 | 429 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 429 | } |
clang::VarDecl const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::VarDecl>() const Line | Count | Source | 259 | 2.51k | const T &getUnchecked() const { | 260 | 2.51k | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 2.51k | } |
clang::CXXCatchStmt const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::CXXCatchStmt>() const Line | Count | Source | 259 | 10 | const T &getUnchecked() const { | 260 | 10 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 10 | } |
clang::CXXConstructorDecl const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::CXXConstructorDecl>() const Line | Count | Source | 259 | 499 | const T &getUnchecked() const { | 260 | 499 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 499 | } |
clang::CXXCtorInitializer const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::CXXCtorInitializer>() const Line | Count | Source | 259 | 88 | const T &getUnchecked() const { | 260 | 88 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 88 | } |
clang::CXXConstructExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::CXXConstructExpr>() const Line | Count | Source | 259 | 372 | const T &getUnchecked() const { | 260 | 372 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 372 | } |
clang::IfStmt const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::IfStmt>() const Line | Count | Source | 259 | 198 | const T &getUnchecked() const { | 260 | 198 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 198 | } |
clang::ArraySubscriptExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::ArraySubscriptExpr>() const Line | Count | Source | 259 | 17 | const T &getUnchecked() const { | 260 | 17 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 17 | } |
clang::CompoundStmt const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::CompoundStmt>() const Line | Count | Source | 259 | 483 | const T &getUnchecked() const { | 260 | 483 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 483 | } |
clang::UnaryOperator const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::UnaryOperator>() const Line | Count | Source | 259 | 2.74k | const T &getUnchecked() const { | 260 | 2.74k | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 2.74k | } |
clang::CastExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::CastExpr>() const Line | Count | Source | 259 | 712 | const T &getUnchecked() const { | 260 | 712 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 712 | } |
clang::ExplicitCastExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::ExplicitCastExpr>() const Line | Count | Source | 259 | 349 | const T &getUnchecked() const { | 260 | 349 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 349 | } |
clang::ImplicitCastExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::ImplicitCastExpr>() const Line | Count | Source | 259 | 119 | const T &getUnchecked() const { | 260 | 119 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 119 | } |
clang::RecordDecl const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::RecordDecl>() const Line | Count | Source | 259 | 931 | const T &getUnchecked() const { | 260 | 931 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 931 | } |
clang::AbstractConditionalOperator const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::AbstractConditionalOperator>() const Line | Count | Source | 259 | 65 | const T &getUnchecked() const { | 260 | 65 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 65 | } |
clang::CXXMethodDecl const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::CXXMethodDecl>() const Line | Count | Source | 259 | 1.25k | const T &getUnchecked() const { | 260 | 1.25k | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 1.25k | } |
clang::MemberExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::MemberExpr>() const Line | Count | Source | 259 | 147 | const T &getUnchecked() const { | 260 | 147 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 147 | } |
clang::UsingDecl const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::UsingDecl>() const Line | Count | Source | 259 | 8 | const T &getUnchecked() const { | 260 | 8 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 8 | } |
clang::UsingShadowDecl const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::UsingShadowDecl>() const Line | Count | Source | 259 | 8 | const T &getUnchecked() const { | 260 | 8 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 8 | } |
clang::VariableArrayType const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::VariableArrayType>() const Line | Count | Source | 259 | 2 | const T &getUnchecked() const { | 260 | 2 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 2 | } |
clang::ElaboratedType const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::ElaboratedType>() const Line | Count | Source | 259 | 12 | const T &getUnchecked() const { | 260 | 12 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 12 | } |
clang::DecayedType const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::DecayedType>() const Line | Count | Source | 259 | 2 | const T &getUnchecked() const { | 260 | 2 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 2 | } |
clang::NestedNameSpecifier const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::NestedNameSpecifier>() const Line | Count | Source | 259 | 112 | const T &getUnchecked() const { | 260 | 112 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 112 | } |
clang::Stmt const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::Stmt>() const Line | Count | Source | 259 | 11.5k | const T &getUnchecked() const { | 260 | 11.5k | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 11.5k | } |
clang::SwitchStmt const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::SwitchStmt>() const Line | Count | Source | 259 | 27 | const T &getUnchecked() const { | 260 | 27 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 27 | } |
clang::NamespaceDecl const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::NamespaceDecl>() const Line | Count | Source | 259 | 32 | const T &getUnchecked() const { | 260 | 32 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 32 | } |
clang::CaseStmt const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::CaseStmt>() const Line | Count | Source | 259 | 10 | const T &getUnchecked() const { | 260 | 10 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 10 | } |
clang::ReturnStmt const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::ReturnStmt>() const Line | Count | Source | 259 | 37 | const T &getUnchecked() const { | 260 | 37 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 37 | } |
clang::ParmVarDecl const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::ParmVarDecl>() const Line | Count | Source | 259 | 370 | const T &getUnchecked() const { | 260 | 370 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 370 | } |
clang::CXXNewExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::CXXNewExpr>() const Line | Count | Source | 259 | 6 | const T &getUnchecked() const { | 260 | 6 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 6 | } |
clang::EnumDecl const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::EnumDecl>() const Line | Count | Source | 259 | 12 | const T &getUnchecked() const { | 260 | 12 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 12 | } |
clang::OMPExecutableDirective const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::OMPExecutableDirective>() const Line | Count | Source | 259 | 69 | const T &getUnchecked() const { | 260 | 69 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 69 | } |
clang::OMPDefaultClause const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::OMPDefaultClause>() const Line | Count | Source | 259 | 8 | const T &getUnchecked() const { | 260 | 8 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 8 | } |
clang::BinaryOperator const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::BinaryOperator>() const Line | Count | Source | 259 | 2.74k | const T &getUnchecked() const { | 260 | 2.74k | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 2.74k | } |
clang::IntegerLiteral const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::IntegerLiteral>() const Line | Count | Source | 259 | 329 | const T &getUnchecked() const { | 260 | 329 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 329 | } |
clang::TypedefType const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::TypedefType>() const Line | Count | Source | 259 | 301 | const T &getUnchecked() const { | 260 | 301 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 301 | } |
clang::RecordType const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::RecordType>() const Line | Count | Source | 259 | 68 | const T &getUnchecked() const { | 260 | 68 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 68 | } |
clang::PointerType const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::PointerType>() const Line | Count | Source | 259 | 224 | const T &getUnchecked() const { | 260 | 224 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 224 | } |
clang::ObjCObjectPointerType const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::ObjCObjectPointerType>() const Line | Count | Source | 259 | 120 | const T &getUnchecked() const { | 260 | 120 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 120 | } |
clang::ConditionalOperator const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::ConditionalOperator>() const Line | Count | Source | 259 | 25 | const T &getUnchecked() const { | 260 | 25 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 25 | } |
clang::BlockDecl const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::BlockDecl>() const Line | Count | Source | 259 | 27 | const T &getUnchecked() const { | 260 | 27 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 27 | } |
clang::CStyleCastExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::CStyleCastExpr>() const Line | Count | Source | 259 | 40 | const T &getUnchecked() const { | 260 | 40 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 40 | } |
clang::ObjCAutoreleasePoolStmt const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::ObjCAutoreleasePoolStmt>() const Line | Count | Source | 259 | 19 | const T &getUnchecked() const { | 260 | 19 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 19 | } |
clang::ObjCIvarRefExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::ObjCIvarRefExpr>() const Line | Count | Source | 259 | 6 | const T &getUnchecked() const { | 260 | 6 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 6 | } |
clang::CXXTypeidExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::CXXTypeidExpr>() const Line | Count | Source | 259 | 2 | const T &getUnchecked() const { | 260 | 2 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 2 | } |
clang::GenericSelectionExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::GenericSelectionExpr>() const Line | Count | Source | 259 | 1 | const T &getUnchecked() const { | 260 | 1 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 1 | } |
clang::ReferenceType const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::ReferenceType>() const Line | Count | Source | 259 | 312 | const T &getUnchecked() const { | 260 | 312 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 312 | } |
clang::LambdaExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::LambdaExpr>() const Line | Count | Source | 259 | 5 | const T &getUnchecked() const { | 260 | 5 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 5 | } |
clang::CXXOperatorCallExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::CXXOperatorCallExpr>() const Line | Count | Source | 259 | 121 | const T &getUnchecked() const { | 260 | 121 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 121 | } |
clang::UnresolvedMemberExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::UnresolvedMemberExpr>() const Line | Count | Source | 259 | 10 | const T &getUnchecked() const { | 260 | 10 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 10 | } |
clang::CXXDependentScopeMemberExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::CXXDependentScopeMemberExpr>() const Line | Count | Source | 259 | 37 | const T &getUnchecked() const { | 260 | 37 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 37 | } |
clang::CXXUnresolvedConstructExpr const& clang::ast_type_traits::DynTypedNode::getUnchecked<clang::CXXUnresolvedConstructExpr>() const Line | Count | Source | 259 | 7 | const T &getUnchecked() const { | 260 | 7 | return BaseConverter<T>::getUnchecked(NodeKind, Storage.buffer); | 261 | 7 | } |
|
262 | | |
263 | 445k | ASTNodeKind getNodeKind() const { return NodeKind; } |
264 | | |
265 | | /// Returns a pointer that identifies the stored AST node. |
266 | | /// |
267 | | /// Note that this is not supported by all AST nodes. For AST nodes |
268 | | /// that don't have a pointer-defined identity inside the AST, this |
269 | | /// method returns NULL. |
270 | 53.3k | const void *getMemoizationData() const { |
271 | 53.3k | return NodeKind.hasPointerIdentity() |
272 | 53.3k | ? *reinterpret_cast<void *const *>(Storage.buffer)53.0k |
273 | 53.3k | : nullptr262 ; |
274 | 53.3k | } |
275 | | |
276 | | /// Prints the node to the given output stream. |
277 | | void print(llvm::raw_ostream &OS, const PrintingPolicy &PP) const; |
278 | | |
279 | | /// Dumps the node to the given output stream. |
280 | | void dump(llvm::raw_ostream &OS, SourceManager &SM) const; |
281 | | |
282 | | /// For nodes which represent textual entities in the source code, |
283 | | /// return their SourceRange. For all other nodes, return SourceRange(). |
284 | | SourceRange getSourceRange() const; |
285 | | |
286 | | /// @{ |
287 | | /// Imposes an order on \c DynTypedNode. |
288 | | /// |
289 | | /// Supports comparison of nodes that support memoization. |
290 | | /// FIXME: Implement comparison for other node types (currently |
291 | | /// only Stmt, Decl, Type and NestedNameSpecifier return memoization data). |
292 | 51.7k | bool operator<(const DynTypedNode &Other) const { |
293 | 51.7k | if (!NodeKind.isSame(Other.NodeKind)) |
294 | 33.1k | return NodeKind < Other.NodeKind; |
295 | 18.5k | |
296 | 18.5k | if (ASTNodeKind::getFromNodeKind<QualType>().isSame(NodeKind)) |
297 | 1 | return getUnchecked<QualType>().getAsOpaquePtr() < |
298 | 1 | Other.getUnchecked<QualType>().getAsOpaquePtr(); |
299 | 18.5k | |
300 | 18.5k | if (ASTNodeKind::getFromNodeKind<TypeLoc>().isSame(NodeKind)) { |
301 | 123 | auto TLA = getUnchecked<TypeLoc>(); |
302 | 123 | auto TLB = Other.getUnchecked<TypeLoc>(); |
303 | 123 | return std::make_pair(TLA.getType().getAsOpaquePtr(), |
304 | 123 | TLA.getOpaqueData()) < |
305 | 123 | std::make_pair(TLB.getType().getAsOpaquePtr(), |
306 | 123 | TLB.getOpaqueData()); |
307 | 123 | } |
308 | 18.4k | |
309 | 18.4k | if (ASTNodeKind::getFromNodeKind<NestedNameSpecifierLoc>().isSame( |
310 | 18.4k | NodeKind)) { |
311 | 0 | auto NNSLA = getUnchecked<NestedNameSpecifierLoc>(); |
312 | 0 | auto NNSLB = Other.getUnchecked<NestedNameSpecifierLoc>(); |
313 | 0 | return std::make_pair(NNSLA.getNestedNameSpecifier(), |
314 | 0 | NNSLA.getOpaqueData()) < |
315 | 0 | std::make_pair(NNSLB.getNestedNameSpecifier(), |
316 | 0 | NNSLB.getOpaqueData()); |
317 | 0 | } |
318 | 18.4k | |
319 | 18.4k | assert(getMemoizationData() && Other.getMemoizationData()); |
320 | 18.4k | return getMemoizationData() < Other.getMemoizationData(); |
321 | 18.4k | } |
322 | 125k | bool operator==(const DynTypedNode &Other) const { |
323 | 125k | // DynTypedNode::create() stores the exact kind of the node in NodeKind. |
324 | 125k | // If they contain the same node, their NodeKind must be the same. |
325 | 125k | if (!NodeKind.isSame(Other.NodeKind)) |
326 | 108k | return false; |
327 | 17.2k | |
328 | 17.2k | // FIXME: Implement for other types. |
329 | 17.2k | if (ASTNodeKind::getFromNodeKind<QualType>().isSame(NodeKind)) |
330 | 11 | return getUnchecked<QualType>() == Other.getUnchecked<QualType>(); |
331 | 17.2k | |
332 | 17.2k | if (ASTNodeKind::getFromNodeKind<TypeLoc>().isSame(NodeKind)) |
333 | 16.4k | return getUnchecked<TypeLoc>() == Other.getUnchecked<TypeLoc>(); |
334 | 802 | |
335 | 802 | if (ASTNodeKind::getFromNodeKind<NestedNameSpecifierLoc>().isSame(NodeKind)) |
336 | 128 | return getUnchecked<NestedNameSpecifierLoc>() == |
337 | 128 | Other.getUnchecked<NestedNameSpecifierLoc>(); |
338 | 674 | |
339 | 674 | assert(getMemoizationData() && Other.getMemoizationData()); |
340 | 674 | return getMemoizationData() == Other.getMemoizationData(); |
341 | 674 | } |
342 | 541 | bool operator!=(const DynTypedNode &Other) const { |
343 | 541 | return !operator==(Other); |
344 | 541 | } |
345 | | /// @} |
346 | | |
347 | | /// Hooks for using DynTypedNode as a key in a DenseMap. |
348 | | struct DenseMapInfo { |
349 | 55.7k | static inline DynTypedNode getEmptyKey() { |
350 | 55.7k | DynTypedNode Node; |
351 | 55.7k | Node.NodeKind = ASTNodeKind::DenseMapInfo::getEmptyKey(); |
352 | 55.7k | return Node; |
353 | 55.7k | } |
354 | 40.1k | static inline DynTypedNode getTombstoneKey() { |
355 | 40.1k | DynTypedNode Node; |
356 | 40.1k | Node.NodeKind = ASTNodeKind::DenseMapInfo::getTombstoneKey(); |
357 | 40.1k | return Node; |
358 | 40.1k | } |
359 | 23.9k | static unsigned getHashValue(const DynTypedNode &Val) { |
360 | 23.9k | // FIXME: Add hashing support for the remaining types. |
361 | 23.9k | if (ASTNodeKind::getFromNodeKind<TypeLoc>().isSame(Val.NodeKind)) { |
362 | 23.0k | auto TL = Val.getUnchecked<TypeLoc>(); |
363 | 23.0k | return llvm::hash_combine(TL.getType().getAsOpaquePtr(), |
364 | 23.0k | TL.getOpaqueData()); |
365 | 23.0k | } |
366 | 930 | |
367 | 930 | if (ASTNodeKind::getFromNodeKind<NestedNameSpecifierLoc>().isSame( |
368 | 930 | Val.NodeKind)) { |
369 | 930 | auto NNSL = Val.getUnchecked<NestedNameSpecifierLoc>(); |
370 | 930 | return llvm::hash_combine(NNSL.getNestedNameSpecifier(), |
371 | 930 | NNSL.getOpaqueData()); |
372 | 930 | } |
373 | 0 | |
374 | 0 | assert(Val.getMemoizationData()); |
375 | 0 | return llvm::hash_value(Val.getMemoizationData()); |
376 | 0 | } |
377 | 222k | static bool isEqual(const DynTypedNode &LHS, const DynTypedNode &RHS) { |
378 | 222k | auto Empty = ASTNodeKind::DenseMapInfo::getEmptyKey(); |
379 | 222k | auto TombStone = ASTNodeKind::DenseMapInfo::getTombstoneKey(); |
380 | 222k | return (ASTNodeKind::DenseMapInfo::isEqual(LHS.NodeKind, Empty) && |
381 | 222k | ASTNodeKind::DenseMapInfo::isEqual(RHS.NodeKind, Empty)97.1k ) || |
382 | 222k | (124k ASTNodeKind::DenseMapInfo::isEqual(LHS.NodeKind, TombStone)124k && |
383 | 124k | ASTNodeKind::DenseMapInfo::isEqual(RHS.NodeKind, TombStone)0 ) || |
384 | 222k | LHS == RHS124k ; |
385 | 222k | } |
386 | | }; |
387 | | |
388 | | private: |
389 | | /// Takes care of converting from and to \c T. |
390 | | template <typename T, typename EnablerT = void> struct BaseConverter; |
391 | | |
392 | | /// Converter that uses dyn_cast<T> from a stored BaseT*. |
393 | | template <typename T, typename BaseT> struct DynCastPtrConverter { |
394 | 112k | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { |
395 | 112k | if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)) |
396 | 68.5k | return &getUnchecked(NodeKind, Storage); |
397 | 43.5k | return nullptr; |
398 | 43.5k | } clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::FunctionDecl, clang::Decl>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 394 | 1.43k | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 395 | 1.43k | if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)) | 396 | 1.41k | return &getUnchecked(NodeKind, Storage); | 397 | 24 | return nullptr; | 398 | 24 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::LambdaExpr, clang::Stmt>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 394 | 32 | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 395 | 32 | if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)) | 396 | 16 | return &getUnchecked(NodeKind, Storage); | 397 | 16 | return nullptr; | 398 | 16 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CallExpr, clang::Stmt>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 394 | 49 | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 395 | 49 | if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)) | 396 | 48 | return &getUnchecked(NodeKind, Storage); | 397 | 1 | return nullptr; | 398 | 1 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::Stmt, clang::Stmt>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 394 | 40.6k | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 395 | 40.6k | if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)) | 396 | 32.8k | return &getUnchecked(NodeKind, Storage); | 397 | 7.79k | return nullptr; | 398 | 7.79k | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::Expr, clang::Stmt>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 394 | 558 | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 395 | 558 | if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)) | 396 | 556 | return &getUnchecked(NodeKind, Storage); | 397 | 2 | return nullptr; | 398 | 2 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::Decl, clang::Decl>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 394 | 68.0k | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 395 | 68.0k | if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)) | 396 | 32.3k | return &getUnchecked(NodeKind, Storage); | 397 | 35.6k | return nullptr; | 398 | 35.6k | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ParmVarDecl, clang::Decl>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 394 | 82 | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 395 | 82 | if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)) | 396 | 82 | return &getUnchecked(NodeKind, Storage); | 397 | 0 | return nullptr; | 398 | 0 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ObjCMethodDecl, clang::Decl>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 394 | 5 | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 395 | 5 | if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)) | 396 | 5 | return &getUnchecked(NodeKind, Storage); | 397 | 0 | return nullptr; | 398 | 0 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CastExpr, clang::Stmt>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 394 | 1 | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 395 | 1 | if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)) | 396 | 1 | return &getUnchecked(NodeKind, Storage); | 397 | 0 | return nullptr; | 398 | 0 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ObjCMessageExpr, clang::Stmt>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 394 | 18 | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 395 | 18 | if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)) | 396 | 18 | return &getUnchecked(NodeKind, Storage); | 397 | 0 | return nullptr; | 398 | 0 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ObjCAutoreleasePoolStmt, clang::Stmt>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 394 | 12 | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 395 | 12 | if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)) | 396 | 12 | return &getUnchecked(NodeKind, Storage); | 397 | 0 | return nullptr; | 398 | 0 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::MemberExpr, clang::Stmt>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 394 | 27 | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 395 | 27 | if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)) | 396 | 27 | return &getUnchecked(NodeKind, Storage); | 397 | 0 | return nullptr; | 398 | 0 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ObjCIvarRefExpr, clang::Stmt>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 394 | 2 | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 395 | 2 | if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)) | 396 | 2 | return &getUnchecked(NodeKind, Storage); | 397 | 0 | return nullptr; | 398 | 0 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::VarDecl, clang::Decl>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 394 | 747 | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 395 | 747 | if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)) | 396 | 747 | return &getUnchecked(NodeKind, Storage); | 397 | 0 | return nullptr; | 398 | 0 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::IntegerLiteral, clang::Stmt>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 394 | 240 | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 395 | 240 | if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)) | 396 | 240 | return &getUnchecked(NodeKind, Storage); | 397 | 0 | return nullptr; | 398 | 0 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::BinaryOperator, clang::Stmt>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 394 | 112 | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 395 | 112 | if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)) | 396 | 112 | return &getUnchecked(NodeKind, Storage); | 397 | 0 | return nullptr; | 398 | 0 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::Type, clang::Type>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 394 | 18 | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 395 | 18 | if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)) | 396 | 16 | return &getUnchecked(NodeKind, Storage); | 397 | 2 | return nullptr; | 398 | 2 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::OMPClause, clang::OMPClause>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 394 | 1 | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 395 | 1 | if (ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)) | 396 | 0 | return &getUnchecked(NodeKind, Storage); | 397 | 1 | return nullptr; | 398 | 1 | } |
|
399 | 139k | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { |
400 | 139k | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); |
401 | 139k | return *cast<T>(static_cast<const BaseT *>( |
402 | 139k | *reinterpret_cast<const void *const *>(Storage))); |
403 | 139k | } clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::FunctionDecl, clang::Decl>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 3.62k | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 3.62k | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 3.62k | return *cast<T>(static_cast<const BaseT *>( | 402 | 3.62k | *reinterpret_cast<const void *const *>(Storage))); | 403 | 3.62k | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::LambdaExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 21 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 21 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 21 | return *cast<T>(static_cast<const BaseT *>( | 402 | 21 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 21 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::Decl, clang::Decl>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 35.4k | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 35.4k | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 35.4k | return *cast<T>(static_cast<const BaseT *>( | 402 | 35.4k | *reinterpret_cast<const void *const *>(Storage))); | 403 | 35.4k | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::FieldDecl, clang::Decl>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 328 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 328 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 328 | return *cast<T>(static_cast<const BaseT *>( | 402 | 328 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 328 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ClassTemplateSpecializationDecl, clang::Decl>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 420 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 420 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 420 | return *cast<T>(static_cast<const BaseT *>( | 402 | 420 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 420 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::Expr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 7.08k | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 7.08k | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 7.08k | return *cast<T>(static_cast<const BaseT *>( | 402 | 7.08k | *reinterpret_cast<const void *const *>(Storage))); | 403 | 7.08k | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CallExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 4.61k | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 4.61k | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 4.61k | return *cast<T>(static_cast<const BaseT *>( | 402 | 4.61k | *reinterpret_cast<const void *const *>(Storage))); | 403 | 4.61k | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::InitListExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 188 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 188 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 188 | return *cast<T>(static_cast<const BaseT *>( | 402 | 188 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 188 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ForStmt, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 624 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 624 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 624 | return *cast<T>(static_cast<const BaseT *>( | 402 | 624 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 624 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CXXForRangeStmt, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 42 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 42 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 42 | return *cast<T>(static_cast<const BaseT *>( | 402 | 42 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 42 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::DesignatedInitExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 144 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 144 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 144 | return *cast<T>(static_cast<const BaseT *>( | 402 | 144 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 144 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::UnaryExprOrTypeTraitExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 27 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 27 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 27 | return *cast<T>(static_cast<const BaseT *>( | 402 | 27 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 27 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::NamedDecl, clang::Decl>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 17.7k | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 17.7k | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 17.7k | return *cast<T>(static_cast<const BaseT *>( | 402 | 17.7k | *reinterpret_cast<const void *const *>(Storage))); | 403 | 17.7k | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CXXRecordDecl, clang::Decl>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 3.87k | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 3.87k | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 3.87k | return *cast<T>(static_cast<const BaseT *>( | 402 | 3.87k | *reinterpret_cast<const void *const *>(Storage))); | 403 | 3.87k | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CXXMemberCallExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 123 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 123 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 123 | return *cast<T>(static_cast<const BaseT *>( | 402 | 123 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 123 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ObjCMessageExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 264 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 264 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 264 | return *cast<T>(static_cast<const BaseT *>( | 402 | 264 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 264 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ObjCMethodDecl, clang::Decl>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 63 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 63 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 63 | return *cast<T>(static_cast<const BaseT *>( | 402 | 63 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 63 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::DeclaratorDecl, clang::Decl>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 28 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 28 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 28 | return *cast<T>(static_cast<const BaseT *>( | 402 | 28 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 28 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::Type, clang::Type>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 1.30k | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 1.30k | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 1.30k | return *cast<T>(static_cast<const BaseT *>( | 402 | 1.30k | *reinterpret_cast<const void *const *>(Storage))); | 403 | 1.30k | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::DeclRefExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 1.42k | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 1.42k | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 1.42k | return *cast<T>(static_cast<const BaseT *>( | 402 | 1.42k | *reinterpret_cast<const void *const *>(Storage))); | 403 | 1.42k | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::OverloadExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 14 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 14 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 14 | return *cast<T>(static_cast<const BaseT *>( | 402 | 14 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 14 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::DeclStmt, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 440 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 440 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 440 | return *cast<T>(static_cast<const BaseT *>( | 402 | 440 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 440 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::VarDecl, clang::Decl>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 3.26k | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 3.26k | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 3.26k | return *cast<T>(static_cast<const BaseT *>( | 402 | 3.26k | *reinterpret_cast<const void *const *>(Storage))); | 403 | 3.26k | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CXXCatchStmt, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 10 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 10 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 10 | return *cast<T>(static_cast<const BaseT *>( | 402 | 10 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 10 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CXXConstructorDecl, clang::Decl>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 524 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 524 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 524 | return *cast<T>(static_cast<const BaseT *>( | 402 | 524 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 524 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CXXConstructExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 375 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 375 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 375 | return *cast<T>(static_cast<const BaseT *>( | 402 | 375 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 375 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::IfStmt, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 242 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 242 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 242 | return *cast<T>(static_cast<const BaseT *>( | 402 | 242 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 242 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ArraySubscriptExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 17 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 17 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 17 | return *cast<T>(static_cast<const BaseT *>( | 402 | 17 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 17 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CompoundStmt, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 516 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 516 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 516 | return *cast<T>(static_cast<const BaseT *>( | 402 | 516 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 516 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::UnaryOperator, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 2.74k | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 2.74k | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 2.74k | return *cast<T>(static_cast<const BaseT *>( | 402 | 2.74k | *reinterpret_cast<const void *const *>(Storage))); | 403 | 2.74k | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CastExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 713 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 713 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 713 | return *cast<T>(static_cast<const BaseT *>( | 402 | 713 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 713 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ExplicitCastExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 349 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 349 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 349 | return *cast<T>(static_cast<const BaseT *>( | 402 | 349 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 349 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ImplicitCastExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 119 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 119 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 119 | return *cast<T>(static_cast<const BaseT *>( | 402 | 119 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 119 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::RecordDecl, clang::Decl>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 1.06k | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 1.06k | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 1.06k | return *cast<T>(static_cast<const BaseT *>( | 402 | 1.06k | *reinterpret_cast<const void *const *>(Storage))); | 403 | 1.06k | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::AbstractConditionalOperator, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 65 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 65 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 65 | return *cast<T>(static_cast<const BaseT *>( | 402 | 65 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 65 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CXXMethodDecl, clang::Decl>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 1.48k | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 1.48k | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 1.48k | return *cast<T>(static_cast<const BaseT *>( | 402 | 1.48k | *reinterpret_cast<const void *const *>(Storage))); | 403 | 1.48k | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::MemberExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 174 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 174 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 174 | return *cast<T>(static_cast<const BaseT *>( | 402 | 174 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 174 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::UsingDecl, clang::Decl>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 9 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 9 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 9 | return *cast<T>(static_cast<const BaseT *>( | 402 | 9 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 9 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::UsingShadowDecl, clang::Decl>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 8 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 8 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 8 | return *cast<T>(static_cast<const BaseT *>( | 402 | 8 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 8 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::VariableArrayType, clang::Type>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 2 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 2 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 2 | return *cast<T>(static_cast<const BaseT *>( | 402 | 2 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 2 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ElaboratedType, clang::Type>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 12 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 12 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 12 | return *cast<T>(static_cast<const BaseT *>( | 402 | 12 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 12 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::DecayedType, clang::Type>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 2 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 2 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 2 | return *cast<T>(static_cast<const BaseT *>( | 402 | 2 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 2 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::Stmt, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 44.4k | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 44.4k | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 44.4k | return *cast<T>(static_cast<const BaseT *>( | 402 | 44.4k | *reinterpret_cast<const void *const *>(Storage))); | 403 | 44.4k | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::SwitchStmt, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 27 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 27 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 27 | return *cast<T>(static_cast<const BaseT *>( | 402 | 27 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 27 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::NamespaceDecl, clang::Decl>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 53 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 53 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 53 | return *cast<T>(static_cast<const BaseT *>( | 402 | 53 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 53 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CaseStmt, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 28 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 28 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 28 | return *cast<T>(static_cast<const BaseT *>( | 402 | 28 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 28 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ReturnStmt, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 37 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 37 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 37 | return *cast<T>(static_cast<const BaseT *>( | 402 | 37 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 37 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ParmVarDecl, clang::Decl>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 452 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 452 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 452 | return *cast<T>(static_cast<const BaseT *>( | 402 | 452 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 452 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CXXNewExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 9 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 9 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 9 | return *cast<T>(static_cast<const BaseT *>( | 402 | 9 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 9 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::EnumDecl, clang::Decl>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 80 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 80 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 80 | return *cast<T>(static_cast<const BaseT *>( | 402 | 80 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 80 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::OMPExecutableDirective, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 69 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 69 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 69 | return *cast<T>(static_cast<const BaseT *>( | 402 | 69 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 69 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::OMPDefaultClause, clang::OMPClause>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 8 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 8 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 8 | return *cast<T>(static_cast<const BaseT *>( | 402 | 8 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 8 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::BinaryOperator, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 2.85k | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 2.85k | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 2.85k | return *cast<T>(static_cast<const BaseT *>( | 402 | 2.85k | *reinterpret_cast<const void *const *>(Storage))); | 403 | 2.85k | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::IntegerLiteral, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 569 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 569 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 569 | return *cast<T>(static_cast<const BaseT *>( | 402 | 569 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 569 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::TypedefType, clang::Type>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 301 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 301 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 301 | return *cast<T>(static_cast<const BaseT *>( | 402 | 301 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 301 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::RecordType, clang::Type>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 68 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 68 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 68 | return *cast<T>(static_cast<const BaseT *>( | 402 | 68 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 68 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::PointerType, clang::Type>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 225 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 225 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 225 | return *cast<T>(static_cast<const BaseT *>( | 402 | 225 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 225 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ObjCObjectPointerType, clang::Type>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 120 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 120 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 120 | return *cast<T>(static_cast<const BaseT *>( | 402 | 120 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 120 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ConditionalOperator, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 25 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 25 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 25 | return *cast<T>(static_cast<const BaseT *>( | 402 | 25 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 25 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::BlockDecl, clang::Decl>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 27 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 27 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 27 | return *cast<T>(static_cast<const BaseT *>( | 402 | 27 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 27 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CStyleCastExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 40 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 40 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 40 | return *cast<T>(static_cast<const BaseT *>( | 402 | 40 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 40 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ObjCAutoreleasePoolStmt, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 31 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 31 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 31 | return *cast<T>(static_cast<const BaseT *>( | 402 | 31 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 31 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ObjCIvarRefExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 8 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 8 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 8 | return *cast<T>(static_cast<const BaseT *>( | 402 | 8 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 8 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CXXTypeidExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 2 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 2 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 2 | return *cast<T>(static_cast<const BaseT *>( | 402 | 2 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 2 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::GenericSelectionExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 1 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 1 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 1 | return *cast<T>(static_cast<const BaseT *>( | 402 | 1 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 1 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ReferenceType, clang::Type>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 312 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 312 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 312 | return *cast<T>(static_cast<const BaseT *>( | 402 | 312 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 312 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CXXOperatorCallExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 133 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 133 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 133 | return *cast<T>(static_cast<const BaseT *>( | 402 | 133 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 133 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::UnresolvedMemberExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 10 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 10 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 10 | return *cast<T>(static_cast<const BaseT *>( | 402 | 10 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 10 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CXXDependentScopeMemberExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 37 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 37 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 37 | return *cast<T>(static_cast<const BaseT *>( | 402 | 37 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 37 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CXXUnresolvedConstructExpr, clang::Stmt>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 399 | 8 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 400 | 8 | assert(ASTNodeKind::getFromNodeKind<T>().isBaseOf(NodeKind)); | 401 | 8 | return *cast<T>(static_cast<const BaseT *>( | 402 | 8 | *reinterpret_cast<const void *const *>(Storage))); | 403 | 8 | } |
Unexecuted instantiation: clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::OMPClause, clang::OMPClause>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) |
404 | 274k | static DynTypedNode create(const BaseT &Node) { |
405 | 274k | DynTypedNode Result; |
406 | 274k | Result.NodeKind = ASTNodeKind::getFromNode(Node); |
407 | 274k | new (Result.Storage.buffer) const void *(&Node); |
408 | 274k | return Result; |
409 | 274k | } clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::Expr, clang::Stmt>::create(clang::Stmt const&) Line | Count | Source | 404 | 8.00k | static DynTypedNode create(const BaseT &Node) { | 405 | 8.00k | DynTypedNode Result; | 406 | 8.00k | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 8.00k | new (Result.Storage.buffer) const void *(&Node); | 408 | 8.00k | return Result; | 409 | 8.00k | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ClassTemplateDecl, clang::Decl>::create(clang::Decl const&) Line | Count | Source | 404 | 102 | static DynTypedNode create(const BaseT &Node) { | 405 | 102 | DynTypedNode Result; | 406 | 102 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 102 | new (Result.Storage.buffer) const void *(&Node); | 408 | 102 | return Result; | 409 | 102 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::Decl, clang::Decl>::create(clang::Decl const&) Line | Count | Source | 404 | 117k | static DynTypedNode create(const BaseT &Node) { | 405 | 117k | DynTypedNode Result; | 406 | 117k | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 117k | new (Result.Storage.buffer) const void *(&Node); | 408 | 117k | return Result; | 409 | 117k | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::Stmt, clang::Stmt>::create(clang::Stmt const&) Line | Count | Source | 404 | 124k | static DynTypedNode create(const BaseT &Node) { | 405 | 124k | DynTypedNode Result; | 406 | 124k | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 124k | new (Result.Storage.buffer) const void *(&Node); | 408 | 124k | return Result; | 409 | 124k | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::VarDecl, clang::Decl>::create(clang::Decl const&) Line | Count | Source | 404 | 557 | static DynTypedNode create(const BaseT &Node) { | 405 | 557 | DynTypedNode Result; | 406 | 557 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 557 | new (Result.Storage.buffer) const void *(&Node); | 408 | 557 | return Result; | 409 | 557 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CXXRecordDecl, clang::Decl>::create(clang::Decl const&) Line | Count | Source | 404 | 2.21k | static DynTypedNode create(const BaseT &Node) { | 405 | 2.21k | DynTypedNode Result; | 406 | 2.21k | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 2.21k | new (Result.Storage.buffer) const void *(&Node); | 408 | 2.21k | return Result; | 409 | 2.21k | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::NamedDecl, clang::Decl>::create(clang::Decl const&) Line | Count | Source | 404 | 602 | static DynTypedNode create(const BaseT &Node) { | 405 | 602 | DynTypedNode Result; | 406 | 602 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 602 | new (Result.Storage.buffer) const void *(&Node); | 408 | 602 | return Result; | 409 | 602 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::Type, clang::Type>::create(clang::Type const&) Line | Count | Source | 404 | 19.4k | static DynTypedNode create(const BaseT &Node) { | 405 | 19.4k | DynTypedNode Result; | 406 | 19.4k | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 19.4k | new (Result.Storage.buffer) const void *(&Node); | 408 | 19.4k | return Result; | 409 | 19.4k | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CXXMemberCallExpr, clang::Stmt>::create(clang::Stmt const&) Line | Count | Source | 404 | 18 | static DynTypedNode create(const BaseT &Node) { | 405 | 18 | DynTypedNode Result; | 406 | 18 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 18 | new (Result.Storage.buffer) const void *(&Node); | 408 | 18 | return Result; | 409 | 18 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::UsingShadowDecl, clang::Decl>::create(clang::Decl const&) Line | Count | Source | 404 | 12 | static DynTypedNode create(const BaseT &Node) { | 405 | 12 | DynTypedNode Result; | 406 | 12 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 12 | new (Result.Storage.buffer) const void *(&Node); | 408 | 12 | return Result; | 409 | 12 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::FieldDecl, clang::Decl>::create(clang::Decl const&) Line | Count | Source | 404 | 74 | static DynTypedNode create(const BaseT &Node) { | 405 | 74 | DynTypedNode Result; | 406 | 74 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 74 | new (Result.Storage.buffer) const void *(&Node); | 408 | 74 | return Result; | 409 | 74 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::DeclStmt, clang::Stmt>::create(clang::Stmt const&) Line | Count | Source | 404 | 129 | static DynTypedNode create(const BaseT &Node) { | 405 | 129 | DynTypedNode Result; | 406 | 129 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 129 | new (Result.Storage.buffer) const void *(&Node); | 408 | 129 | return Result; | 409 | 129 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CXXMethodDecl, clang::Decl>::create(clang::Decl const&) Line | Count | Source | 404 | 524 | static DynTypedNode create(const BaseT &Node) { | 405 | 524 | DynTypedNode Result; | 406 | 524 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 524 | new (Result.Storage.buffer) const void *(&Node); | 408 | 524 | return Result; | 409 | 524 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ValueDecl, clang::Decl>::create(clang::Decl const&) Line | Count | Source | 404 | 19 | static DynTypedNode create(const BaseT &Node) { | 405 | 19 | DynTypedNode Result; | 406 | 19 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 19 | new (Result.Storage.buffer) const void *(&Node); | 408 | 19 | return Result; | 409 | 19 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::NamespaceDecl, clang::Decl>::create(clang::Decl const&) Line | Count | Source | 404 | 36 | static DynTypedNode create(const BaseT &Node) { | 405 | 36 | DynTypedNode Result; | 406 | 36 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 36 | new (Result.Storage.buffer) const void *(&Node); | 408 | 36 | return Result; | 409 | 36 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::SwitchCase, clang::Stmt>::create(clang::Stmt const&) Line | Count | Source | 404 | 23 | static DynTypedNode create(const BaseT &Node) { | 405 | 23 | DynTypedNode Result; | 406 | 23 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 23 | new (Result.Storage.buffer) const void *(&Node); | 408 | 23 | return Result; | 409 | 23 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::FunctionDecl, clang::Decl>::create(clang::Decl const&) Line | Count | Source | 404 | 418 | static DynTypedNode create(const BaseT &Node) { | 405 | 418 | DynTypedNode Result; | 406 | 418 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 418 | new (Result.Storage.buffer) const void *(&Node); | 408 | 418 | return Result; | 409 | 418 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::OMPClause, clang::OMPClause>::create(clang::OMPClause const&) Line | Count | Source | 404 | 24 | static DynTypedNode create(const BaseT &Node) { | 405 | 24 | DynTypedNode Result; | 406 | 24 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 24 | new (Result.Storage.buffer) const void *(&Node); | 408 | 24 | return Result; | 409 | 24 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CompoundStmt, clang::Stmt>::create(clang::Stmt const&) Line | Count | Source | 404 | 431 | static DynTypedNode create(const BaseT &Node) { | 405 | 431 | DynTypedNode Result; | 406 | 431 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 431 | new (Result.Storage.buffer) const void *(&Node); | 408 | 431 | return Result; | 409 | 431 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::UnaryOperator, clang::Stmt>::create(clang::Stmt const&) Line | Count | Source | 404 | 21 | static DynTypedNode create(const BaseT &Node) { | 405 | 21 | DynTypedNode Result; | 406 | 21 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 21 | new (Result.Storage.buffer) const void *(&Node); | 408 | 21 | return Result; | 409 | 21 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ExplicitCastExpr, clang::Stmt>::create(clang::Stmt const&) Line | Count | Source | 404 | 110 | static DynTypedNode create(const BaseT &Node) { | 405 | 110 | DynTypedNode Result; | 406 | 110 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 110 | new (Result.Storage.buffer) const void *(&Node); | 408 | 110 | return Result; | 409 | 110 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ParmVarDecl, clang::Decl>::create(clang::Decl const&) Line | Count | Source | 404 | 452 | static DynTypedNode create(const BaseT &Node) { | 405 | 452 | DynTypedNode Result; | 406 | 452 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 452 | new (Result.Storage.buffer) const void *(&Node); | 408 | 452 | return Result; | 409 | 452 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ObjCMethodDecl, clang::Decl>::create(clang::Decl const&) Line | Count | Source | 404 | 6 | static DynTypedNode create(const BaseT &Node) { | 405 | 6 | DynTypedNode Result; | 406 | 6 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 6 | new (Result.Storage.buffer) const void *(&Node); | 408 | 6 | return Result; | 409 | 6 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::BlockDecl, clang::Decl>::create(clang::Decl const&) Line | Count | Source | 404 | 1 | static DynTypedNode create(const BaseT &Node) { | 405 | 1 | DynTypedNode Result; | 406 | 1 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 1 | new (Result.Storage.buffer) const void *(&Node); | 408 | 1 | return Result; | 409 | 1 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ObjCMessageExpr, clang::Stmt>::create(clang::Stmt const&) Line | Count | Source | 404 | 35 | static DynTypedNode create(const BaseT &Node) { | 405 | 35 | DynTypedNode Result; | 406 | 35 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 35 | new (Result.Storage.buffer) const void *(&Node); | 408 | 35 | return Result; | 409 | 35 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::ObjCAutoreleasePoolStmt, clang::Stmt>::create(clang::Stmt const&) Line | Count | Source | 404 | 19 | static DynTypedNode create(const BaseT &Node) { | 405 | 19 | DynTypedNode Result; | 406 | 19 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 19 | new (Result.Storage.buffer) const void *(&Node); | 408 | 19 | return Result; | 409 | 19 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::InitListExpr, clang::Stmt>::create(clang::Stmt const&) Line | Count | Source | 404 | 135 | static DynTypedNode create(const BaseT &Node) { | 405 | 135 | DynTypedNode Result; | 406 | 135 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 135 | new (Result.Storage.buffer) const void *(&Node); | 408 | 135 | return Result; | 409 | 135 | } |
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<clang::CastExpr, clang::Stmt>::create(clang::Stmt const&) Line | Count | Source | 404 | 62 | static DynTypedNode create(const BaseT &Node) { | 405 | 62 | DynTypedNode Result; | 406 | 62 | Result.NodeKind = ASTNodeKind::getFromNode(Node); | 407 | 62 | new (Result.Storage.buffer) const void *(&Node); | 408 | 62 | return Result; | 409 | 62 | } |
|
410 | | }; |
411 | | |
412 | | /// Converter that stores T* (by pointer). |
413 | | template <typename T> struct PtrConverter { |
414 | 435 | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { |
415 | 435 | if (ASTNodeKind::getFromNodeKind<T>().isSame(NodeKind)) |
416 | 62 | return &getUnchecked(NodeKind, Storage); |
417 | 373 | return nullptr; |
418 | 373 | } clang::ast_type_traits::DynTypedNode::PtrConverter<clang::NestedNameSpecifier>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 414 | 175 | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 415 | 175 | if (ASTNodeKind::getFromNodeKind<T>().isSame(NodeKind)) | 416 | 45 | return &getUnchecked(NodeKind, Storage); | 417 | 130 | return nullptr; | 418 | 130 | } |
clang::ast_type_traits::DynTypedNode::PtrConverter<clang::CXXCtorInitializer>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 414 | 260 | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 415 | 260 | if (ASTNodeKind::getFromNodeKind<T>().isSame(NodeKind)) | 416 | 17 | return &getUnchecked(NodeKind, Storage); | 417 | 243 | return nullptr; | 418 | 243 | } |
|
419 | 262 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { |
420 | 262 | assert(ASTNodeKind::getFromNodeKind<T>().isSame(NodeKind)); |
421 | 262 | return *static_cast<const T *>( |
422 | 262 | *reinterpret_cast<const void *const *>(Storage)); |
423 | 262 | } clang::ast_type_traits::DynTypedNode::PtrConverter<clang::CXXCtorInitializer>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 419 | 105 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 420 | 105 | assert(ASTNodeKind::getFromNodeKind<T>().isSame(NodeKind)); | 421 | 105 | return *static_cast<const T *>( | 422 | 105 | *reinterpret_cast<const void *const *>(Storage)); | 423 | 105 | } |
clang::ast_type_traits::DynTypedNode::PtrConverter<clang::NestedNameSpecifier>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 419 | 157 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 420 | 157 | assert(ASTNodeKind::getFromNodeKind<T>().isSame(NodeKind)); | 421 | 157 | return *static_cast<const T *>( | 422 | 157 | *reinterpret_cast<const void *const *>(Storage)); | 423 | 157 | } |
|
424 | 783 | static DynTypedNode create(const T &Node) { |
425 | 783 | DynTypedNode Result; |
426 | 783 | Result.NodeKind = ASTNodeKind::getFromNodeKind<T>(); |
427 | 783 | new (Result.Storage.buffer) const void *(&Node); |
428 | 783 | return Result; |
429 | 783 | } clang::ast_type_traits::DynTypedNode::PtrConverter<clang::NestedNameSpecifier>::create(clang::NestedNameSpecifier const&) Line | Count | Source | 424 | 591 | static DynTypedNode create(const T &Node) { | 425 | 591 | DynTypedNode Result; | 426 | 591 | Result.NodeKind = ASTNodeKind::getFromNodeKind<T>(); | 427 | 591 | new (Result.Storage.buffer) const void *(&Node); | 428 | 591 | return Result; | 429 | 591 | } |
clang::ast_type_traits::DynTypedNode::PtrConverter<clang::CXXCtorInitializer>::create(clang::CXXCtorInitializer const&) Line | Count | Source | 424 | 192 | static DynTypedNode create(const T &Node) { | 425 | 192 | DynTypedNode Result; | 426 | 192 | Result.NodeKind = ASTNodeKind::getFromNodeKind<T>(); | 427 | 192 | new (Result.Storage.buffer) const void *(&Node); | 428 | 192 | return Result; | 429 | 192 | } |
|
430 | | }; |
431 | | |
432 | | /// Converter that stores T (by value). |
433 | | template <typename T> struct ValueConverter { |
434 | 11.1k | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { |
435 | 11.1k | if (ASTNodeKind::getFromNodeKind<T>().isSame(NodeKind)) |
436 | 2.82k | return reinterpret_cast<const T *>(Storage); |
437 | 8.33k | return nullptr; |
438 | 8.33k | } clang::ast_type_traits::DynTypedNode::ValueConverter<clang::QualType>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 434 | 200 | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 435 | 200 | if (ASTNodeKind::getFromNodeKind<T>().isSame(NodeKind)) | 436 | 178 | return reinterpret_cast<const T *>(Storage); | 437 | 22 | return nullptr; | 438 | 22 | } |
clang::ast_type_traits::DynTypedNode::ValueConverter<clang::NestedNameSpecifierLoc>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 434 | 5.52k | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 435 | 5.52k | if (ASTNodeKind::getFromNodeKind<T>().isSame(NodeKind)) | 436 | 174 | return reinterpret_cast<const T *>(Storage); | 437 | 5.34k | return nullptr; | 438 | 5.34k | } |
clang::ast_type_traits::DynTypedNode::ValueConverter<clang::TypeLoc>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 434 | 5.43k | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 435 | 5.43k | if (ASTNodeKind::getFromNodeKind<T>().isSame(NodeKind)) | 436 | 2.46k | return reinterpret_cast<const T *>(Storage); | 437 | 2.96k | return nullptr; | 438 | 2.96k | } |
clang::ast_type_traits::DynTypedNode::ValueConverter<clang::TemplateArgument>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 434 | 3 | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 435 | 3 | if (ASTNodeKind::getFromNodeKind<T>().isSame(NodeKind)) | 436 | 1 | return reinterpret_cast<const T *>(Storage); | 437 | 2 | return nullptr; | 438 | 2 | } |
clang::ast_type_traits::DynTypedNode::ValueConverter<clang::TemplateName>::get(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 434 | 2 | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { | 435 | 2 | if (ASTNodeKind::getFromNodeKind<T>().isSame(NodeKind)) | 436 | 0 | return reinterpret_cast<const T *>(Storage); | 437 | 2 | return nullptr; | 438 | 2 | } |
|
439 | 68.7k | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { |
440 | 68.7k | assert(ASTNodeKind::getFromNodeKind<T>().isSame(NodeKind)); |
441 | 68.7k | return *reinterpret_cast<const T *>(Storage); |
442 | 68.7k | } clang::ast_type_traits::DynTypedNode::ValueConverter<clang::QualType>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 439 | 10.9k | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 440 | 10.9k | assert(ASTNodeKind::getFromNodeKind<T>().isSame(NodeKind)); | 441 | 10.9k | return *reinterpret_cast<const T *>(Storage); | 442 | 10.9k | } |
clang::ast_type_traits::DynTypedNode::ValueConverter<clang::TypeLoc>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 439 | 56.5k | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 440 | 56.5k | assert(ASTNodeKind::getFromNodeKind<T>().isSame(NodeKind)); | 441 | 56.5k | return *reinterpret_cast<const T *>(Storage); | 442 | 56.5k | } |
clang::ast_type_traits::DynTypedNode::ValueConverter<clang::NestedNameSpecifierLoc>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 439 | 1.25k | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 440 | 1.25k | assert(ASTNodeKind::getFromNodeKind<T>().isSame(NodeKind)); | 441 | 1.25k | return *reinterpret_cast<const T *>(Storage); | 442 | 1.25k | } |
clang::ast_type_traits::DynTypedNode::ValueConverter<clang::TemplateArgument>::getUnchecked(clang::ast_type_traits::ASTNodeKind, char const*) Line | Count | Source | 439 | 46 | static const T &getUnchecked(ASTNodeKind NodeKind, const char Storage[]) { | 440 | 46 | assert(ASTNodeKind::getFromNodeKind<T>().isSame(NodeKind)); | 441 | 46 | return *reinterpret_cast<const T *>(Storage); | 442 | 46 | } |
|
443 | 80.4k | static DynTypedNode create(const T &Node) { |
444 | 80.4k | DynTypedNode Result; |
445 | 80.4k | Result.NodeKind = ASTNodeKind::getFromNodeKind<T>(); |
446 | 80.4k | new (Result.Storage.buffer) T(Node); |
447 | 80.4k | return Result; |
448 | 80.4k | } clang::ast_type_traits::DynTypedNode::ValueConverter<clang::QualType>::create(clang::QualType const&) Line | Count | Source | 443 | 22.2k | static DynTypedNode create(const T &Node) { | 444 | 22.2k | DynTypedNode Result; | 445 | 22.2k | Result.NodeKind = ASTNodeKind::getFromNodeKind<T>(); | 446 | 22.2k | new (Result.Storage.buffer) T(Node); | 447 | 22.2k | return Result; | 448 | 22.2k | } |
clang::ast_type_traits::DynTypedNode::ValueConverter<clang::TemplateName>::create(clang::TemplateName const&) Line | Count | Source | 443 | 2 | static DynTypedNode create(const T &Node) { | 444 | 2 | DynTypedNode Result; | 445 | 2 | Result.NodeKind = ASTNodeKind::getFromNodeKind<T>(); | 446 | 2 | new (Result.Storage.buffer) T(Node); | 447 | 2 | return Result; | 448 | 2 | } |
clang::ast_type_traits::DynTypedNode::ValueConverter<clang::TypeLoc>::create(clang::TypeLoc const&) Line | Count | Source | 443 | 45.1k | static DynTypedNode create(const T &Node) { | 444 | 45.1k | DynTypedNode Result; | 445 | 45.1k | Result.NodeKind = ASTNodeKind::getFromNodeKind<T>(); | 446 | 45.1k | new (Result.Storage.buffer) T(Node); | 447 | 45.1k | return Result; | 448 | 45.1k | } |
clang::ast_type_traits::DynTypedNode::ValueConverter<clang::NestedNameSpecifierLoc>::create(clang::NestedNameSpecifierLoc const&) Line | Count | Source | 443 | 13.0k | static DynTypedNode create(const T &Node) { | 444 | 13.0k | DynTypedNode Result; | 445 | 13.0k | Result.NodeKind = ASTNodeKind::getFromNodeKind<T>(); | 446 | 13.0k | new (Result.Storage.buffer) T(Node); | 447 | 13.0k | return Result; | 448 | 13.0k | } |
|
449 | | }; |
450 | | |
451 | | ASTNodeKind NodeKind; |
452 | | |
453 | | /// Stores the data of the node. |
454 | | /// |
455 | | /// Note that we can store \c Decls, \c Stmts, \c Types, |
456 | | /// \c NestedNameSpecifiers and \c CXXCtorInitializer by pointer as they are |
457 | | /// guaranteed to be unique pointers pointing to dedicated storage in the AST. |
458 | | /// \c QualTypes, \c NestedNameSpecifierLocs, \c TypeLocs and |
459 | | /// \c TemplateArguments on the other hand do not have storage or unique |
460 | | /// pointers and thus need to be stored by value. |
461 | | llvm::AlignedCharArrayUnion<const void *, TemplateArgument, |
462 | | NestedNameSpecifierLoc, QualType, |
463 | | TypeLoc> Storage; |
464 | | }; |
465 | | |
466 | | template <typename T> |
467 | | struct DynTypedNode::BaseConverter< |
468 | | T, typename std::enable_if<std::is_base_of<Decl, T>::value>::type> |
469 | | : public DynCastPtrConverter<T, Decl> {}; |
470 | | |
471 | | template <typename T> |
472 | | struct DynTypedNode::BaseConverter< |
473 | | T, typename std::enable_if<std::is_base_of<Stmt, T>::value>::type> |
474 | | : public DynCastPtrConverter<T, Stmt> {}; |
475 | | |
476 | | template <typename T> |
477 | | struct DynTypedNode::BaseConverter< |
478 | | T, typename std::enable_if<std::is_base_of<Type, T>::value>::type> |
479 | | : public DynCastPtrConverter<T, Type> {}; |
480 | | |
481 | | template <typename T> |
482 | | struct DynTypedNode::BaseConverter< |
483 | | T, typename std::enable_if<std::is_base_of<OMPClause, T>::value>::type> |
484 | | : public DynCastPtrConverter<T, OMPClause> {}; |
485 | | |
486 | | template <> |
487 | | struct DynTypedNode::BaseConverter< |
488 | | NestedNameSpecifier, void> : public PtrConverter<NestedNameSpecifier> {}; |
489 | | |
490 | | template <> |
491 | | struct DynTypedNode::BaseConverter< |
492 | | CXXCtorInitializer, void> : public PtrConverter<CXXCtorInitializer> {}; |
493 | | |
494 | | template <> |
495 | | struct DynTypedNode::BaseConverter< |
496 | | TemplateArgument, void> : public ValueConverter<TemplateArgument> {}; |
497 | | |
498 | | template <> |
499 | | struct DynTypedNode::BaseConverter< |
500 | | TemplateName, void> : public ValueConverter<TemplateName> {}; |
501 | | |
502 | | template <> |
503 | | struct DynTypedNode::BaseConverter< |
504 | | NestedNameSpecifierLoc, |
505 | | void> : public ValueConverter<NestedNameSpecifierLoc> {}; |
506 | | |
507 | | template <> |
508 | | struct DynTypedNode::BaseConverter<QualType, |
509 | | void> : public ValueConverter<QualType> {}; |
510 | | |
511 | | template <> |
512 | | struct DynTypedNode::BaseConverter< |
513 | | TypeLoc, void> : public ValueConverter<TypeLoc> {}; |
514 | | |
515 | | // The only operation we allow on unsupported types is \c get. |
516 | | // This allows to conveniently use \c DynTypedNode when having an arbitrary |
517 | | // AST node that is not supported, but prevents misuse - a user cannot create |
518 | | // a DynTypedNode from arbitrary types. |
519 | | template <typename T, typename EnablerT> struct DynTypedNode::BaseConverter { |
520 | | static const T *get(ASTNodeKind NodeKind, const char Storage[]) { |
521 | | return NULL; |
522 | | } |
523 | | }; |
524 | | |
525 | | } // end namespace ast_type_traits |
526 | | } // end namespace clang |
527 | | |
528 | | namespace llvm { |
529 | | |
530 | | template <> |
531 | | struct DenseMapInfo<clang::ast_type_traits::ASTNodeKind> |
532 | | : clang::ast_type_traits::ASTNodeKind::DenseMapInfo {}; |
533 | | |
534 | | template <> |
535 | | struct DenseMapInfo<clang::ast_type_traits::DynTypedNode> |
536 | | : clang::ast_type_traits::DynTypedNode::DenseMapInfo {}; |
537 | | |
538 | | } // end namespace llvm |
539 | | |
540 | | #endif |