clang-tools 22.0.0git
UseNullptrCheck.cpp File Reference
#include "UseNullptrCheck.h"
#include "../utils/Matchers.h"
#include "../utils/OptionsUtils.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Lex/Lexer.h"

Go to the source code of this file.

Namespaces

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

Functions

static StatementMatcher clang::tidy::modernize::makeCastSequenceMatcher (llvm::ArrayRef< StringRef > NameList)
 Create a matcher that finds implicit casts as well as the head of a sequence of zero or more nested explicit casts that have an implicit cast to null within.
static bool clang::tidy::modernize::isReplaceableRange (SourceLocation StartLoc, SourceLocation EndLoc, const SourceManager &SM)
static void clang::tidy::modernize::replaceWithNullptr (ClangTidyCheck &Check, SourceManager &SM, SourceLocation StartLoc, SourceLocation EndLoc)
 Replaces the provided range with the text "nullptr", but only if the start and end location are both in main file.
static StringRef clang::tidy::modernize::getOutermostMacroName (SourceLocation Loc, const SourceManager &SM, const LangOptions &LO)
 Returns the name of the outermost macro.

Variables

static const char clang::tidy::modernize::CastSequence [] = "sequence"