clang 20.0.0git
Classes | Namespaces | Functions
ASTDiff.cpp File Reference
#include "clang/Tooling/ASTDiff/ASTDiff.h"
#include "clang/AST/ParentMapContext.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/Lexer.h"
#include "llvm/ADT/PriorityQueue.h"
#include <limits>
#include <memory>
#include <optional>
#include <unordered_set>

Go to the source code of this file.

Classes

class  clang::diff::ASTDiff::Impl
 
class  clang::diff::SyntaxTree::Impl
 Represents the AST of a TranslationUnit. More...
 
struct  clang::diff::SNodeId
 Identifies a node in a subtree by its postorder offset, starting at 1. More...
 
class  clang::diff::Subtree
 
class  clang::diff::ZhangShashaMatcher
 Implementation of Zhang and Shasha's Algorithm for tree edit distance. More...
 

Namespaces

namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
 
namespace  clang::diff
 

Functions

static bool clang::diff::isSpecializedNodeExcluded (const Decl *D)
 
static bool clang::diff::isSpecializedNodeExcluded (const Stmt *S)
 
static bool clang::diff::isSpecializedNodeExcluded (CXXCtorInitializer *I)
 
template<class T >
static bool clang::diff::isNodeExcluded (const SourceManager &SrcMgr, T *N)
 
static std::vector< NodeId > clang::diff::getSubtreePostorder (const SyntaxTree::Impl &Tree, NodeId Root)
 
static std::vector< NodeId > clang::diff::getSubtreeBfs (const SyntaxTree::Impl &Tree, NodeId Root)
 
static const DeclContextclang::diff::getEnclosingDeclContext (ASTContext &AST, const Stmt *S)
 
static std::string clang::diff::getInitializerValue (const CXXCtorInitializer *Init, const PrintingPolicy &TypePP)
 

Variable Documentation

◆ Depth

int Depth = 0

Definition at line 190 of file ASTDiff.cpp.

◆ Id

int Id = 0

Definition at line 190 of file ASTDiff.cpp.

◆ Parent

NodeId Parent

Definition at line 191 of file ASTDiff.cpp.

Referenced by clang::Sema::ActOnFields(), clang::Sema::ActOnFinishLinkageSpecification(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnStartNamespaceDef(), clang::interp::VariableScope< Emitter >::addExtended(), clang::format::MacroCallReconstructor::addLine(), clang::interp::VariableScope< Emitter >::addLocal(), adjustParent(), clang::ast_matchers::AST_MATCHER_P(), clang::Sema::BuildBuiltinOffsetOf(), clang::ento::RetainSummaryManager::canEval(), canInitializeArrayWithEmbedDataString(), clang::ModuleMap::canonicalizeModuleMapPath(), clang::CFGBlock::CFGBlock(), checkDuplicateDefaultInit(), clang::interp::InterpState::checkingForUndefinedBehavior(), clang::interp::InterpState::checkingPotentialConstantExpression(), clang::DependentDiagnostic::Create(), clang::ConstructionContextLayer::create(), clang::Sema::CreateBuiltin(), clang::ModuleMap::createGlobalModuleFragmentForModuleUnit(), clang::ModuleMap::createImplicitGlobalModuleFragmentForModuleUnit(), clang::CodeGen::CGDebugInfo::CreateMacro(), clang::ModuleMap::createPrivateModuleFragmentForInterfaceUnit(), clang::CodeGen::CGDebugInfo::CreateTempMacroFile(), clang::sema::DelayedDiagnosticPool::DelayedDiagnosticPool(), clang::Scope::dumpImpl(), clang::sema::DelayedDiagnosticPool::empty(), clang::interp::Context::evaluate(), clang::interp::Context::evaluateAsInitializer(), clang::interp::Context::evaluateAsRValue(), clang::ModuleMap::findOrCreateModule(), clang::diff::SyntaxTree::Impl::findPositionInParent(), clang::CodeGen::ConstantAggregateBuilderTemplateBase< Impl, Traits >::finishAndAddTo(), clang::CodeGen::ConstantAggregateBuilderTemplateBase< Impl, Traits >::finishAndCreateFuture(), clang::CodeGen::ConstantAggregateBuilderTemplateBase< Impl, Traits >::finishAndCreateGlobal(), clang::CodeGen::ConstantAggregateBuilderTemplateBase< Impl, Traits >::finishAndSetAsInitializer(), clang::format::forEachToken(), clang::interp::InterpState::getBottomFrame(), clang::interp::InterpState::getCtx(), clang::ASTContext::getDeclAlign(), clang::GetEnclosingNamedOrTopAnonRecord(), getEnclosingParent(), getEnclosingStmtLocation(), clang::interp::InterpState::getEvalStatus(), clang::tooling::CodeRangeASTSelection::getFunctionLikeNearestParent(), getImplicitCodeSegAttrFromClass(), clang::ObjCProtocolDecl::getImpliedProtocols(), clang::ASTNodeKind::getMostDerivedCommonAncestor(), clang::LocationContext::getParent(), clang::ConstructionContextLayer::getParent(), clang::sema::DelayedDiagnosticPool::getParent(), clang::InitializedEntity::getParent(), clang::interp::VariableScope< Emitter >::getParent(), clang::CodeGen::LoopInfo::getParent(), getRequiredQualification(), clang::Sema::getSelfAssignmentClassMemberCandidate(), clang::interp::InterpState::getSplitFrame(), clang::AnalysisDeclContextManager::getStackFrame(), clang::ento::PathDiagnosticLocation::getValidSourceLocation(), clang::index::IndexingContext::handleReference(), clang::interp::InterpState::hasActiveDiagnostic(), clang::interp::InterpState::hasPriorDiagnostic(), hasUnguardedAccess(), clang::interp::InterpState::inConstantContext(), clang::index::IndexingContext::indexBody(), clang::index::IndexingContext::indexNestedNameSpecifierLoc(), clang::index::IndexingContext::indexTypeLoc(), clang::index::IndexingContext::indexTypeSourceInfo(), clang::ModuleMap::inferFrameworkModule(), clang::Sema::inferGslPointerAttribute(), clang::dataflow::Environment::initialize(), clang::InitializedEntity::InitializeBase(), clang::InitializedEntity::InitializeElement(), clang::InitializedEntity::InitializeMember(), initializingConstexprVariable(), InsertOCLBuiltinDeclarationsFromTable(), isDesignatorAtObjectEnd(), clang::tooling::CodeRangeASTSelection::isInFunctionLikeBodyOfCode(), clang::AnalysisDeclContext::isInStdNamespace(), clang::ConstructionContextLayer::isLast(), clang::LocationContext::isParentOf(), clang::interp::Context::isPotentialConstantExpr(), clang::ODRHash::isSubDeclToBeProcessed(), clang::ento::BugSuppression::isSuppressed(), clang::index::IndexingContext::isTemplateImplicitInstantiation(), clang::interp::InterpState::keepEvaluatingAfterFailure(), clang::LocationContext::LocationContext(), clang::Sema::MarkFunctionReferenced(), matchesPostDecrInWhile(), clang::Sema::MatchTemplateParametersToScopeSpecifier(), clang::interp::InterpState::noteUndefinedBehavior(), clang::Decl::operator new(), clang::sema::DelayedDiagnosticPool::operator=(), potentiallyWritesIntoIvar(), removeLValueToRValueCast(), rewriteBuiltinFunctionDecl(), clang::Scope::Scope(), seenBefore(), clang::interp::InterpState::setActiveDiagnostic(), clang::interp::InterpState::setFoldFailureDiagnostic(), clang::FunctionDecl::setIsPureVirtual(), clang::ParentMap::setParent(), clang::ASTDeclWriter::VisitNamespaceDecl(), clang::ento::SValExplainer::VisitParamVarRegion(), and clang::interp::VariableScope< Emitter >::~VariableScope().

◆ Tree

const SyntaxTree::Impl& Tree