clang-tools 20.0.0git
Namespaces | Functions
LoopConvertUtils.cpp File Reference
#include "LoopConvertUtils.h"
#include "../utils/ASTUtils.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/Lambda.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/TokenKinds.h"
#include "clang/Lex/Lexer.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Casting.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <optional>
#include <string>
#include <utility>

Go to the source code of this file.

Namespaces

namespace  clang
 ===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
 
namespace  clang::tidy
 
namespace  clang::tidy::modernize
 

Functions

const Expr * clang::tidy::modernize::digThroughConstructorsConversions (const Expr *E)
 Look through conversion/copy constructors and member functions to find the explicit initialization expression, returning it is found.
 
bool clang::tidy::modernize::areSameExpr (ASTContext *Context, const Expr *First, const Expr *Second)
 Returns true when two Exprs are equivalent.
 
const DeclRefExpr * clang::tidy::modernize::getDeclRef (const Expr *E)
 Returns the DeclRefExpr represented by E, or NULL if there isn't one.
 
bool clang::tidy::modernize::areSameVariable (const ValueDecl *First, const ValueDecl *Second)
 Returns true when two ValueDecls are the same variable.
 
static bool clang::tidy::modernize::exprReferencesVariable (const ValueDecl *Target, const Expr *E)
 Determines if an expression is a declaration reference to a particular variable.
 
static const Expr * clang::tidy::modernize::getDereferenceOperand (const Expr *E)
 If the expression is a dereference or call to operator*(), return the operand.
 
template<typename ContainerT >
static bool clang::tidy::modernize::containsExpr (ASTContext *Context, const ContainerT *Container, const Expr *E)
 Returns true when the Container contains an Expr equivalent to E.
 
static bool clang::tidy::modernize::isIndexInSubscriptExpr (const Expr *IndexExpr, const VarDecl *IndexVar)
 Returns true when the index expression is a declaration reference to IndexVar.
 
static bool clang::tidy::modernize::isIndexInSubscriptExpr (ASTContext *Context, const Expr *IndexExpr, const VarDecl *IndexVar, const Expr *Obj, const Expr *SourceExpr, bool PermitDeref)
 Returns true when the index expression is a declaration reference to IndexVar, Obj is the same expression as SourceExpr after all parens and implicit casts are stripped off.
 
static bool clang::tidy::modernize::isDereferenceOfOpCall (const CXXOperatorCallExpr *OpCall, const VarDecl *IndexVar)
 Returns true when Opcall is a call a one-parameter dereference of IndexVar.
 
static bool clang::tidy::modernize::isDereferenceOfUop (const UnaryOperator *Uop, const VarDecl *IndexVar)
 Returns true when Uop is a dereference of IndexVar.
 
static bool clang::tidy::modernize::isAliasDecl (ASTContext *Context, const Decl *TheDecl, const VarDecl *IndexVar)
 Determines whether the given Decl defines a variable initialized to the loop object.
 
static bool clang::tidy::modernize::arrayMatchesBoundExpr (ASTContext *Context, const QualType &ArrayType, const Expr *ConditionExpr)
 Determines whether the bound of a for loop condition expression is the same as the statically computable size of ArrayType.