clang-tools  16.0.0git
Classes | Namespaces | Functions | Variables
LoopConvertCheck.cpp File Reference
#include "LoopConvertCheck.h"
#include "clang/AST/ASTContext.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/Lexer.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstring>
#include <utility>
Include dependency graph for LoopConvertCheck.cpp:

Go to the source code of this file.


struct  clang::tidy::OptionEnumMapping< modernize::Confidence::Level >
struct  clang::tidy::OptionEnumMapping< modernize::VariableNamer::NamingStyle >


 ===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//


static const StatementMatcher clang::tidy::modernize::integerComparisonMatcher ()
static const DeclarationMatcher clang::tidy::modernize::initToZeroMatcher ()
static const StatementMatcher clang::tidy::modernize::incrementVarMatcher ()
static StatementMatcher clang::tidy::modernize::arrayConditionMatcher (internal::Matcher< Expr > LimitExpr)
StatementMatcher clang::tidy::modernize::makeArrayLoopMatcher ()
 The matcher for loops over arrays. More...
StatementMatcher clang::tidy::modernize::makeIteratorLoopMatcher (bool IsReverse)
 The matcher used for iterator-based for loops. More...
StatementMatcher clang::tidy::modernize::makePseudoArrayLoopMatcher ()
 The matcher used for array-like containers (pseudoarrays). More...
static const Expr * clang::tidy::modernize::getContainerFromBeginEndCall (const Expr *Init, bool IsBegin, bool *IsArrow, bool IsReverse)
 Determine whether Init appears to be an initializing an iterator. More...
static const Expr * clang::tidy::modernize::findContainer (ASTContext *Context, const Expr *BeginExpr, const Expr *EndExpr, bool *ContainerNeedsDereference, bool IsReverse)
 Determines the container whose begin() and end() functions are called for an iterator-based loop. More...
static StringRef clang::tidy::modernize::getStringFromRange (SourceManager &SourceMgr, const LangOptions &LangOpts, SourceRange Range)
 Obtain the original source code text from a SourceRange. More...
static const ValueDecl * clang::tidy::modernize::getReferencedVariable (const Expr *E)
 If the given expression is actually a DeclRefExpr or a MemberExpr, find and return the underlying ValueDecl; otherwise, return NULL. More...
static bool clang::tidy::modernize::isDirectMemberExpr (const Expr *E)
 Returns true when the given expression is a member expression whose base is this (implicitly or not). More...
static bool clang::tidy::modernize::canBeModified (ASTContext *Context, const Expr *E)
 Given an expression that represents an usage of an element from the containter that we are iterating over, returns false when it can be guaranteed this element cannot be modified as a result of this usage. More...
static bool clang::tidy::modernize::usagesAreConst (ASTContext *Context, const UsageResult &Usages)
 Returns true when it can be guaranteed that the elements of the container are not being modified. More...
static bool clang::tidy::modernize::usagesReturnRValues (const UsageResult &Usages)
 Returns true if the elements of the container are never accessed by reference. More...
static bool clang::tidy::modernize::containerIsConst (const Expr *ContainerExpr, bool Dereference)
 Returns true if the container is const-qualified. More...


static const char clang::tidy::modernize::LoopNameArray [] = "forLoopArray"
static const char clang::tidy::modernize::LoopNameIterator [] = "forLoopIterator"
static const char clang::tidy::modernize::LoopNameReverseIterator [] = "forLoopReverseIterator"
static const char clang::tidy::modernize::LoopNamePseudoArray [] = "forLoopPseudoArray"
static const char clang::tidy::modernize::ConditionBoundName [] = "conditionBound"
static const char clang::tidy::modernize::InitVarName [] = "initVar"
static const char clang::tidy::modernize::BeginCallName [] = "beginCall"
static const char clang::tidy::modernize::EndCallName [] = "endCall"
static const char clang::tidy::modernize::EndVarName [] = "endVar"
static const char clang::tidy::modernize::DerefByValueResultName [] = "derefByValueResult"
static const char clang::tidy::modernize::DerefByRefResultName [] = "derefByRefResult"