clang-tools  6.0.0svn
Public Member Functions | Friends | List of all members
clang::tidy::modernize::DeclFinderASTVisitor Class Reference

Class used to determine if any declarations used in a Stmt would conflict with a particular identifier. More...

#include <LoopConvertUtils.h>

Inheritance diagram for clang::tidy::modernize::DeclFinderASTVisitor:
Inheritance graph
[legend]
Collaboration diagram for clang::tidy::modernize::DeclFinderASTVisitor:
Collaboration graph
[legend]

Public Member Functions

 DeclFinderASTVisitor (const std::string &Name, const StmtGeneratedVarNameMap *GeneratedDecls)
 
bool findUsages (const clang::Stmt *Body)
 Attempts to find any usages of variables name Name in Body, returning true when it is used in Body. More...
 

Friends

class clang::RecursiveASTVisitor< DeclFinderASTVisitor >
 

Detailed Description

Class used to determine if any declarations used in a Stmt would conflict with a particular identifier.

This search includes the names that don't actually appear in the AST (i.e. created by a refactoring tool) by including a map from Stmts to generated names associated with those stmts.

Definition at line 173 of file LoopConvertUtils.h.

Constructor & Destructor Documentation

◆ DeclFinderASTVisitor()

clang::tidy::modernize::DeclFinderASTVisitor::DeclFinderASTVisitor ( const std::string &  Name,
const StmtGeneratedVarNameMap GeneratedDecls 
)
inline

Definition at line 176 of file LoopConvertUtils.h.

Member Function Documentation

◆ findUsages()

bool clang::tidy::modernize::DeclFinderASTVisitor::findUsages ( const clang::Stmt *  Body)
inline

Attempts to find any usages of variables name Name in Body, returning true when it is used in Body.

This includes the generated loop variables of ForStmts which have already been transformed.

Definition at line 183 of file LoopConvertUtils.h.

Referenced by clang::tidy::modernize::VariableNamer::createIndexName().

Friends And Related Function Documentation

◆ clang::RecursiveASTVisitor< DeclFinderASTVisitor >

friend class clang::RecursiveASTVisitor< DeclFinderASTVisitor >
friend

Definition at line 189 of file LoopConvertUtils.h.


The documentation for this class was generated from the following files: