reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

tools/clang/unittests/AST/ASTTypeTraitsTest.cpp
   30   EXPECT_FALSE(DNT<Decl>().isNone());
   31   EXPECT_FALSE(DNT<VarDecl>().isNone());
   35   EXPECT_TRUE(DNT<Decl>().isBaseOf(DNT<VarDecl>()));
   35   EXPECT_TRUE(DNT<Decl>().isBaseOf(DNT<VarDecl>()));
   36   EXPECT_FALSE(DNT<Decl>().isSame(DNT<VarDecl>()));
   36   EXPECT_FALSE(DNT<Decl>().isSame(DNT<VarDecl>()));
   37   EXPECT_FALSE(DNT<VarDecl>().isBaseOf(DNT<Decl>()));
   37   EXPECT_FALSE(DNT<VarDecl>().isBaseOf(DNT<Decl>()));
   39   EXPECT_TRUE(DNT<Decl>().isSame(DNT<Decl>()));
   39   EXPECT_TRUE(DNT<Decl>().isSame(DNT<Decl>()));
   44   EXPECT_TRUE(DNT<Expr>().isBaseOf(DNT<Expr>(), &Distance));
   44   EXPECT_TRUE(DNT<Expr>().isBaseOf(DNT<Expr>(), &Distance));
   47   EXPECT_TRUE(DNT<Stmt>().isBaseOf(DNT<IfStmt>(), &Distance));
   47   EXPECT_TRUE(DNT<Stmt>().isBaseOf(DNT<IfStmt>(), &Distance));
   51   EXPECT_TRUE(DNT<DeclaratorDecl>().isBaseOf(DNT<ParmVarDecl>(), &Distance));
   51   EXPECT_TRUE(DNT<DeclaratorDecl>().isBaseOf(DNT<ParmVarDecl>(), &Distance));
   56   EXPECT_TRUE(DNT<Expr>().isBaseOf(DNT<CallExpr>()));
   56   EXPECT_TRUE(DNT<Expr>().isBaseOf(DNT<CallExpr>()));
   57   EXPECT_TRUE(DNT<Expr>().isBaseOf(DNT<BinaryOperator>()));
   57   EXPECT_TRUE(DNT<Expr>().isBaseOf(DNT<BinaryOperator>()));
   58   EXPECT_FALSE(DNT<CallExpr>().isBaseOf(DNT<BinaryOperator>()));
   58   EXPECT_FALSE(DNT<CallExpr>().isBaseOf(DNT<BinaryOperator>()));
   59   EXPECT_FALSE(DNT<BinaryOperator>().isBaseOf(DNT<CallExpr>()));
   59   EXPECT_FALSE(DNT<BinaryOperator>().isBaseOf(DNT<CallExpr>()));
   63   EXPECT_FALSE(DNT<Expr>().isBaseOf(DNT<ArrayType>()));
   63   EXPECT_FALSE(DNT<Expr>().isBaseOf(DNT<ArrayType>()));
   64   EXPECT_FALSE(DNT<QualType>().isBaseOf(DNT<FunctionDecl>()));
   64   EXPECT_FALSE(DNT<QualType>().isBaseOf(DNT<FunctionDecl>()));
   65   EXPECT_FALSE(DNT<Type>().isSame(DNT<QualType>()));
   65   EXPECT_FALSE(DNT<Type>().isSame(DNT<QualType>()));
   69   EXPECT_TRUE(DNT<BinaryOperator>().isSame(
   70       ASTNodeKind::getMostDerivedType(DNT<Expr>(), DNT<BinaryOperator>())));
   70       ASTNodeKind::getMostDerivedType(DNT<Expr>(), DNT<BinaryOperator>())));
   71   EXPECT_TRUE(DNT<BinaryOperator>().isSame(
   72       ASTNodeKind::getMostDerivedType(DNT<BinaryOperator>(), DNT<Expr>())));
   72       ASTNodeKind::getMostDerivedType(DNT<BinaryOperator>(), DNT<Expr>())));
   73   EXPECT_TRUE(DNT<VarDecl>().isSame(
   74       ASTNodeKind::getMostDerivedType(DNT<VarDecl>(), DNT<VarDecl>())));
   74       ASTNodeKind::getMostDerivedType(DNT<VarDecl>(), DNT<VarDecl>())));
   78       ASTNodeKind::getMostDerivedType(DNT<IfStmt>(), DNT<VarDecl>()).isNone());
   78       ASTNodeKind::getMostDerivedType(DNT<IfStmt>(), DNT<VarDecl>()).isNone());
   79   EXPECT_TRUE(ASTNodeKind::getMostDerivedType(DNT<IfStmt>(),
   80                                               DNT<BinaryOperator>()).isNone());
   84   EXPECT_TRUE(DNT<Expr>().isSame(ASTNodeKind::getMostDerivedCommonAncestor(
   85       DNT<Expr>(), DNT<BinaryOperator>())));
   85       DNT<Expr>(), DNT<BinaryOperator>())));
   86   EXPECT_TRUE(DNT<Expr>().isSame(ASTNodeKind::getMostDerivedCommonAncestor(
   87       DNT<BinaryOperator>(), DNT<Expr>())));
   87       DNT<BinaryOperator>(), DNT<Expr>())));
   88   EXPECT_TRUE(DNT<VarDecl>().isSame(ASTNodeKind::getMostDerivedCommonAncestor(
   89       DNT<VarDecl>(), DNT<VarDecl>())));
   89       DNT<VarDecl>(), DNT<VarDecl>())));
   93       DNT<NamedDecl>().isSame(ASTNodeKind::getMostDerivedCommonAncestor(
   94           DNT<CXXMethodDecl>(), DNT<RecordDecl>())));
   94           DNT<CXXMethodDecl>(), DNT<RecordDecl>())));
   98                   DNT<IfStmt>(), DNT<VarDecl>()).isNone());
   98                   DNT<IfStmt>(), DNT<VarDecl>()).isNone());
  105   EXPECT_FALSE(DNT<Foo>().isSame(DNT<Foo>()));
  105   EXPECT_FALSE(DNT<Foo>().isSame(DNT<Foo>()));