llvm/clang-tools-extra/clang-tidy/utils/ExprSequence.cpp

//===---------- ExprSequence.cpp - clang-tidy -----------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "ExprSequence.h"
#include "clang/AST/ParentMapContext.h"
#include "llvm/ADT/SmallVector.h"
#include <optional>

namespace clang::tidy::utils {

// Returns the Stmt nodes that are parents of 'S', skipping any potential
// intermediate non-Stmt nodes.
//
// In almost all cases, this function returns a single parent or no parents at
// all.
//
// The case that a Stmt has multiple parents is rare but does actually occur in
// the parts of the AST that we're interested in. Specifically, InitListExpr
// nodes cause ASTContext::getParent() to return multiple parents for certain
// nodes in their subtree because RecursiveASTVisitor visits both the syntactic
// and semantic forms of InitListExpr, and the parent-child relationships are
// different between the two forms.
static SmallVector<const Stmt *, 1> getParentStmts(const Stmt *S,
                                                   ASTContext *Context) {}

namespace {

bool isDescendantOrEqual(const Stmt *Descendant, const Stmt *Ancestor,
                         ASTContext *Context) {}

bool isDescendantOfArgs(const Stmt *Descendant, const CallExpr *Call,
                        ASTContext *Context) {}

llvm::SmallVector<const InitListExpr *>
getAllInitListForms(const InitListExpr *InitList) {}

} // namespace

ExprSequence::ExprSequence(const CFG *TheCFG, const Stmt *Root,
                           ASTContext *TheContext)
    :{}

bool ExprSequence::inSequence(const Stmt *Before, const Stmt *After) const {}

bool ExprSequence::potentiallyAfter(const Stmt *After,
                                    const Stmt *Before) const {}

const Stmt *ExprSequence::getSequenceSuccessor(const Stmt *S) const {}

const Stmt *ExprSequence::resolveSyntheticStmt(const Stmt *S) const {}

StmtToBlockMap::StmtToBlockMap(const CFG *TheCFG, ASTContext *TheContext)
    :{}

const CFGBlock *StmtToBlockMap::blockContainingStmt(const Stmt *S) const {}

} // namespace clang::tidy::utils