summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/modernize
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2019-08-22 11:32:57 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2019-08-22 11:32:57 +0000
commit282dc72c8b84759dda4fe12420228158962351e8 (patch)
treeffcad792c5d71d8ebe53a15b65b154dbd0a50528 /clang-tools-extra/clang-tidy/modernize
parentc6744055adf950b8deaa0291cb475d70ca292740 (diff)
downloadbcm5719-llvm-282dc72c8b84759dda4fe12420228158962351e8.tar.gz
bcm5719-llvm-282dc72c8b84759dda4fe12420228158962351e8.zip
Remove \brief commands from doxygen comments.
Summary: We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done [This is analogous to LLVM r331272 and CFE r331834] Subscribers: srhines, nemanjai, javed.absar, kbarton, MaskRay, jkorous, arphaman, jfb, kadircet, jsji, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66578 llvm-svn: 369643
Diffstat (limited to 'clang-tools-extra/clang-tidy/modernize')
-rw-r--r--clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp38
-rw-r--r--clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp64
-rw-r--r--clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.h46
-rw-r--r--clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp12
-rw-r--r--clang-tools-extra/clang-tidy/modernize/RedundantVoidArgCheck.h2
-rw-r--r--clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp2
-rw-r--r--clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp18
-rw-r--r--clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp12
-rw-r--r--clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.h2
-rw-r--r--clang-tools-extra/clang-tidy/modernize/UseEqualsDeleteCheck.h2
-rw-r--r--clang-tools-extra/clang-tidy/modernize/UseNodiscardCheck.h2
-rw-r--r--clang-tools-extra/clang-tidy/modernize/UseNoexceptCheck.h2
-rw-r--r--clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp18
13 files changed, 110 insertions, 110 deletions
diff --git a/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp b/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
index 027bfce54ca..f359702b3f5 100644
--- a/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
@@ -61,7 +61,7 @@ static const StatementMatcher IncrementVarMatcher() {
return declRefExpr(to(varDecl(hasType(isInteger())).bind(IncrementVarName)));
}
-/// \brief The matcher for loops over arrays.
+/// The matcher for loops over arrays.
///
/// In this general example, assuming 'j' and 'k' are of integral type:
/// \code
@@ -97,7 +97,7 @@ StatementMatcher makeArrayLoopMatcher() {
.bind(LoopNameArray);
}
-/// \brief The matcher used for iterator-based for loops.
+/// The matcher used for iterator-based for loops.
///
/// This matcher is more flexible than array-based loops. It will match
/// catch loops of the following textual forms (regardless of whether the
@@ -204,7 +204,7 @@ StatementMatcher makeIteratorLoopMatcher() {
.bind(LoopNameIterator);
}
-/// \brief The matcher used for array-like containers (pseudoarrays).
+/// The matcher used for array-like containers (pseudoarrays).
///
/// This matcher is more flexible than array-based loops. It will match
/// loops of the following textual forms (regardless of whether the
@@ -296,7 +296,7 @@ StatementMatcher makePseudoArrayLoopMatcher() {
.bind(LoopNamePseudoArray);
}
-/// \brief Determine whether Init appears to be an initializing an iterator.
+/// Determine whether Init appears to be an initializing an iterator.
///
/// If it is, returns the object whose begin() or end() method is called, and
/// the output parameter isArrow is set to indicate whether the initialization
@@ -326,7 +326,7 @@ static const Expr *getContainerFromBeginEndCall(const Expr *Init, bool IsBegin,
return SourceExpr;
}
-/// \brief Determines the container whose begin() and end() functions are called
+/// Determines the container whose begin() and end() functions are called
/// for an iterator-based loop.
///
/// BeginExpr must be a member call to a function named "begin()", and EndExpr
@@ -355,7 +355,7 @@ static const Expr *findContainer(ASTContext *Context, const Expr *BeginExpr,
return BeginContainerExpr;
}
-/// \brief Obtain the original source code text from a SourceRange.
+/// Obtain the original source code text from a SourceRange.
static StringRef getStringFromRange(SourceManager &SourceMgr,
const LangOptions &LangOpts,
SourceRange Range) {
@@ -368,7 +368,7 @@ static StringRef getStringFromRange(SourceManager &SourceMgr,
LangOpts);
}
-/// \brief If the given expression is actually a DeclRefExpr or a MemberExpr,
+/// If the given expression is actually a DeclRefExpr or a MemberExpr,
/// find and return the underlying ValueDecl; otherwise, return NULL.
static const ValueDecl *getReferencedVariable(const Expr *E) {
if (const DeclRefExpr *DRE = getDeclRef(E))
@@ -378,7 +378,7 @@ static const ValueDecl *getReferencedVariable(const Expr *E) {
return nullptr;
}
-/// \brief Returns true when the given expression is a member expression
+/// Returns true when the given expression is a member expression
/// whose base is `this` (implicitly or not).
static bool isDirectMemberExpr(const Expr *E) {
if (const auto *Member = dyn_cast<MemberExpr>(E->IgnoreParenImpCasts()))
@@ -386,7 +386,7 @@ static bool isDirectMemberExpr(const Expr *E) {
return false;
}
-/// \brief Given an expression that represents an usage of an element from the
+/// 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.
static bool canBeModified(ASTContext *Context, const Expr *E) {
@@ -406,7 +406,7 @@ static bool canBeModified(ASTContext *Context, const Expr *E) {
return true;
}
-/// \brief Returns true when it can be guaranteed that the elements of the
+/// Returns true when it can be guaranteed that the elements of the
/// container are not being modified.
static bool usagesAreConst(ASTContext *Context, const UsageResult &Usages) {
for (const Usage &U : Usages) {
@@ -422,7 +422,7 @@ static bool usagesAreConst(ASTContext *Context, const UsageResult &Usages) {
return true;
}
-/// \brief Returns true if the elements of the container are never accessed
+/// Returns true if the elements of the container are never accessed
/// by reference.
static bool usagesReturnRValues(const UsageResult &Usages) {
for (const auto &U : Usages) {
@@ -432,7 +432,7 @@ static bool usagesReturnRValues(const UsageResult &Usages) {
return true;
}
-/// \brief Returns true if the container is const-qualified.
+/// Returns true if the container is const-qualified.
static bool containerIsConst(const Expr *ContainerExpr, bool Dereference) {
if (const auto *VDec = getReferencedVariable(ContainerExpr)) {
QualType CType = VDec->getType();
@@ -491,7 +491,7 @@ void LoopConvertCheck::registerMatchers(MatchFinder *Finder) {
Finder->addMatcher(makePseudoArrayLoopMatcher(), this);
}
-/// \brief Given the range of a single declaration, such as:
+/// Given the range of a single declaration, such as:
/// \code
/// unsigned &ThisIsADeclarationThatCanSpanSeveralLinesOfCode =
/// InitializationValues[I];
@@ -515,7 +515,7 @@ void LoopConvertCheck::getAliasRange(SourceManager &SM, SourceRange &Range) {
SourceRange(Range.getBegin(), Range.getEnd().getLocWithOffset(Offset));
}
-/// \brief Computes the changes needed to convert a given for loop, and
+/// Computes the changes needed to convert a given for loop, and
/// applies them.
void LoopConvertCheck::doConversion(
ASTContext *Context, const VarDecl *IndexVar,
@@ -650,7 +650,7 @@ void LoopConvertCheck::doConversion(
TUInfo->getGeneratedDecls().insert(make_pair(Loop, VarName));
}
-/// \brief Returns a string which refers to the container iterated over.
+/// Returns a string which refers to the container iterated over.
StringRef LoopConvertCheck::getContainerString(ASTContext *Context,
const ForStmt *Loop,
const Expr *ContainerExpr) {
@@ -666,7 +666,7 @@ StringRef LoopConvertCheck::getContainerString(ASTContext *Context,
return ContainerString;
}
-/// \brief Determines what kind of 'auto' must be used after converting a for
+/// Determines what kind of 'auto' must be used after converting a for
/// loop that iterates over an array or pseudoarray.
void LoopConvertCheck::getArrayLoopQualifiers(ASTContext *Context,
const BoundNodes &Nodes,
@@ -701,7 +701,7 @@ void LoopConvertCheck::getArrayLoopQualifiers(ASTContext *Context,
}
}
-/// \brief Determines what kind of 'auto' must be used after converting an
+/// Determines what kind of 'auto' must be used after converting an
/// iterator based for loop.
void LoopConvertCheck::getIteratorLoopQualifiers(ASTContext *Context,
const BoundNodes &Nodes,
@@ -743,7 +743,7 @@ void LoopConvertCheck::getIteratorLoopQualifiers(ASTContext *Context,
}
}
-/// \brief Determines the parameters needed to build the range replacement.
+/// Determines the parameters needed to build the range replacement.
void LoopConvertCheck::determineRangeDescriptor(
ASTContext *Context, const BoundNodes &Nodes, const ForStmt *Loop,
LoopFixerKind FixerKind, const Expr *ContainerExpr,
@@ -756,7 +756,7 @@ void LoopConvertCheck::determineRangeDescriptor(
getArrayLoopQualifiers(Context, Nodes, ContainerExpr, Usages, Descriptor);
}
-/// \brief Check some of the conditions that must be met for the loop to be
+/// Check some of the conditions that must be met for the loop to be
/// convertible.
bool LoopConvertCheck::isConvertible(ASTContext *Context,
const ast_matchers::BoundNodes &Nodes,
diff --git a/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp b/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp
index 80d80a79de4..03efd12ded2 100644
--- a/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.cpp
@@ -30,7 +30,7 @@ namespace clang {
namespace tidy {
namespace modernize {
-/// \brief Tracks a stack of parent statements during traversal.
+/// Tracks a stack of parent statements during traversal.
///
/// All this really does is inject push_back() before running
/// RecursiveASTVisitor::TraverseStmt() and pop_back() afterwards. The Stmt atop
@@ -44,7 +44,7 @@ bool StmtAncestorASTVisitor::TraverseStmt(Stmt *Statement) {
return true;
}
-/// \brief Keep track of the DeclStmt associated with each VarDecl.
+/// Keep track of the DeclStmt associated with each VarDecl.
///
/// Combined with StmtAncestors, this provides roughly the same information as
/// Scope, as we can map a VarDecl to its DeclStmt, then walk up the parent tree
@@ -57,19 +57,19 @@ bool StmtAncestorASTVisitor::VisitDeclStmt(DeclStmt *Decls) {
return true;
}
-/// \brief record the DeclRefExpr as part of the parent expression.
+/// record the DeclRefExpr as part of the parent expression.
bool ComponentFinderASTVisitor::VisitDeclRefExpr(DeclRefExpr *E) {
Components.push_back(E);
return true;
}
-/// \brief record the MemberExpr as part of the parent expression.
+/// record the MemberExpr as part of the parent expression.
bool ComponentFinderASTVisitor::VisitMemberExpr(MemberExpr *Member) {
Components.push_back(Member);
return true;
}
-/// \brief Forward any DeclRefExprs to a check on the referenced variable
+/// Forward any DeclRefExprs to a check on the referenced variable
/// declaration.
bool DependencyFinderASTVisitor::VisitDeclRefExpr(DeclRefExpr *DeclRef) {
if (auto *V = dyn_cast_or_null<VarDecl>(DeclRef->getDecl()))
@@ -77,7 +77,7 @@ bool DependencyFinderASTVisitor::VisitDeclRefExpr(DeclRefExpr *DeclRef) {
return true;
}
-/// \brief Determine if any this variable is declared inside the ContainingStmt.
+/// Determine if any this variable is declared inside the ContainingStmt.
bool DependencyFinderASTVisitor::VisitVarDecl(VarDecl *V) {
const Stmt *Curr = DeclParents->lookup(V);
// First, see if the variable was declared within an inner scope of the loop.
@@ -100,7 +100,7 @@ bool DependencyFinderASTVisitor::VisitVarDecl(VarDecl *V) {
return true;
}
-/// \brief If we already created a variable for TheLoop, check to make sure
+/// If we already created a variable for TheLoop, check to make sure
/// that the name was not already taken.
bool DeclFinderASTVisitor::VisitForStmt(ForStmt *TheLoop) {
StmtGeneratedVarNameMap::const_iterator I = GeneratedDecls->find(TheLoop);
@@ -111,7 +111,7 @@ bool DeclFinderASTVisitor::VisitForStmt(ForStmt *TheLoop) {
return true;
}
-/// \brief If any named declaration within the AST subtree has the same name,
+/// If any named declaration within the AST subtree has the same name,
/// then consider Name already taken.
bool DeclFinderASTVisitor::VisitNamedDecl(NamedDecl *D) {
const IdentifierInfo *Ident = D->getIdentifier();
@@ -122,7 +122,7 @@ bool DeclFinderASTVisitor::VisitNamedDecl(NamedDecl *D) {
return true;
}
-/// \brief Forward any declaration references to the actual check on the
+/// Forward any declaration references to the actual check on the
/// referenced declaration.
bool DeclFinderASTVisitor::VisitDeclRefExpr(DeclRefExpr *DeclRef) {
if (auto *D = dyn_cast<NamedDecl>(DeclRef->getDecl()))
@@ -130,7 +130,7 @@ bool DeclFinderASTVisitor::VisitDeclRefExpr(DeclRefExpr *DeclRef) {
return true;
}
-/// \brief If the new variable name conflicts with any type used in the loop,
+/// If the new variable name conflicts with any type used in the loop,
/// then we mark that variable name as taken.
bool DeclFinderASTVisitor::VisitTypeLoc(TypeLoc TL) {
QualType QType = TL.getType();
@@ -152,7 +152,7 @@ bool DeclFinderASTVisitor::VisitTypeLoc(TypeLoc TL) {
return true;
}
-/// \brief Look through conversion/copy constructors to find the explicit
+/// Look through conversion/copy constructors to find the explicit
/// initialization expression, returning it is found.
///
/// The main idea is that given
@@ -183,7 +183,7 @@ const Expr *digThroughConstructors(const Expr *E) {
return E;
}
-/// \brief Returns true when two Exprs are equivalent.
+/// Returns true when two Exprs are equivalent.
bool areSameExpr(ASTContext *Context, const Expr *First, const Expr *Second) {
if (!First || !Second)
return false;
@@ -194,18 +194,18 @@ bool areSameExpr(ASTContext *Context, const Expr *First, const Expr *Second) {
return FirstID == SecondID;
}
-/// \brief Returns the DeclRefExpr represented by E, or NULL if there isn't one.
+/// Returns the DeclRefExpr represented by E, or NULL if there isn't one.
const DeclRefExpr *getDeclRef(const Expr *E) {
return dyn_cast<DeclRefExpr>(E->IgnoreParenImpCasts());
}
-/// \brief Returns true when two ValueDecls are the same variable.
+/// Returns true when two ValueDecls are the same variable.
bool areSameVariable(const ValueDecl *First, const ValueDecl *Second) {
return First && Second &&
First->getCanonicalDecl() == Second->getCanonicalDecl();
}
-/// \brief Determines if an expression is a declaration reference to a
+/// Determines if an expression is a declaration reference to a
/// particular variable.
static bool exprReferencesVariable(const ValueDecl *Target, const Expr *E) {
if (!Target || !E)
@@ -214,7 +214,7 @@ static bool exprReferencesVariable(const ValueDecl *Target, const Expr *E) {
return Decl && areSameVariable(Target, Decl->getDecl());
}
-/// \brief If the expression is a dereference or call to operator*(), return the
+/// If the expression is a dereference or call to operator*(), return the
/// operand. Otherwise, return NULL.
static const Expr *getDereferenceOperand(const Expr *E) {
if (const auto *Uop = dyn_cast<UnaryOperator>(E))
@@ -229,7 +229,7 @@ static const Expr *getDereferenceOperand(const Expr *E) {
return nullptr;
}
-/// \brief Returns true when the Container contains an Expr equivalent to E.
+/// Returns true when the Container contains an Expr equivalent to E.
template <typename ContainerT>
static bool containsExpr(ASTContext *Context, const ContainerT *Container,
const Expr *E) {
@@ -242,7 +242,7 @@ static bool containsExpr(ASTContext *Context, const ContainerT *Container,
return false;
}
-/// \brief Returns true when the index expression is a declaration reference to
+/// Returns true when the index expression is a declaration reference to
/// IndexVar.
///
/// If the index variable is `index`, this function returns true on
@@ -257,7 +257,7 @@ static bool isIndexInSubscriptExpr(const Expr *IndexExpr,
areSameVariable(IndexVar, Idx->getDecl());
}
-/// \brief Returns true when the index expression is a declaration reference to
+/// 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.
///
@@ -302,7 +302,7 @@ static bool isIndexInSubscriptExpr(ASTContext *Context, const Expr *IndexExpr,
return false;
}
-/// \brief Returns true when Opcall is a call a one-parameter dereference of
+/// Returns true when Opcall is a call a one-parameter dereference of
/// IndexVar.
///
/// For example, if the index variable is `index`, returns true for
@@ -316,7 +316,7 @@ static bool isDereferenceOfOpCall(const CXXOperatorCallExpr *OpCall,
exprReferencesVariable(IndexVar, OpCall->getArg(0));
}
-/// \brief Returns true when Uop is a dereference of IndexVar.
+/// Returns true when Uop is a dereference of IndexVar.
///
/// For example, if the index variable is `index`, returns true for
/// *index
@@ -329,7 +329,7 @@ static bool isDereferenceOfUop(const UnaryOperator *Uop,
exprReferencesVariable(IndexVar, Uop->getSubExpr());
}
-/// \brief Determines whether the given Decl defines a variable initialized to
+/// Determines whether the given Decl defines a variable initialized to
/// the loop object.
///
/// This is intended to find cases such as
@@ -416,7 +416,7 @@ static bool isAliasDecl(ASTContext *Context, const Decl *TheDecl,
return false;
}
-/// \brief Determines whether the bound of a for loop condition expression is
+/// Determines whether the bound of a for loop condition expression is
/// the same as the statically computable size of ArrayType.
///
/// Given
@@ -489,7 +489,7 @@ void ForLoopIndexUseVisitor::addUsage(const Usage &U) {
Usages.push_back(U);
}
-/// \brief If the unary operator is a dereference of IndexVar, include it
+/// If the unary operator is a dereference of IndexVar, include it
/// as a valid usage and prune the traversal.
///
/// For example, if container.begin() and container.end() both return pointers
@@ -511,7 +511,7 @@ bool ForLoopIndexUseVisitor::TraverseUnaryDeref(UnaryOperator *Uop) {
return VisitorBase::TraverseUnaryOperator(Uop);
}
-/// \brief If the member expression is operator-> (overloaded or not) on
+/// If the member expression is operator-> (overloaded or not) on
/// IndexVar, include it as a valid usage and prune the traversal.
///
/// For example, given
@@ -588,7 +588,7 @@ bool ForLoopIndexUseVisitor::TraverseMemberExpr(MemberExpr *Member) {
return VisitorBase::TraverseMemberExpr(Member);
}
-/// \brief If a member function call is the at() accessor on the container with
+/// If a member function call is the at() accessor on the container with
/// IndexVar as the single argument, include it as a valid usage and prune
/// the traversal.
///
@@ -621,7 +621,7 @@ bool ForLoopIndexUseVisitor::TraverseCXXMemberCallExpr(
return VisitorBase::TraverseCXXMemberCallExpr(MemberCall);
}
-/// \brief If an overloaded operator call is a dereference of IndexVar or
+/// If an overloaded operator call is a dereference of IndexVar or
/// a subscript of the container with IndexVar as the single argument,
/// include it as a valid usage and prune the traversal.
///
@@ -667,7 +667,7 @@ bool ForLoopIndexUseVisitor::TraverseCXXOperatorCallExpr(
return VisitorBase::TraverseCXXOperatorCallExpr(OpCall);
}
-/// \brief If we encounter an array with IndexVar as the index of an
+/// If we encounter an array with IndexVar as the index of an
/// ArraySubsriptExpression, note it as a consistent usage and prune the
/// AST traversal.
///
@@ -709,7 +709,7 @@ bool ForLoopIndexUseVisitor::TraverseArraySubscriptExpr(ArraySubscriptExpr *E) {
return true;
}
-/// \brief If we encounter a reference to IndexVar in an unpruned branch of the
+/// If we encounter a reference to IndexVar in an unpruned branch of the
/// traversal, mark this loop as unconvertible.
///
/// This implements the whitelist for convertible loops: any usages of IndexVar
@@ -752,7 +752,7 @@ bool ForLoopIndexUseVisitor::VisitDeclRefExpr(DeclRefExpr *E) {
return true;
}
-/// \brief If the loop index is captured by a lambda, replace this capture
+/// If the loop index is captured by a lambda, replace this capture
/// by the range-for loop variable.
///
/// For example:
@@ -792,7 +792,7 @@ bool ForLoopIndexUseVisitor::TraverseLambdaCapture(LambdaExpr *LE,
return VisitorBase::TraverseLambdaCapture(LE, C, Init);
}
-/// \brief If we find that another variable is created just to refer to the loop
+/// If we find that another variable is created just to refer to the loop
/// element, note it for reuse as the loop variable.
///
/// See the comments for isAliasDecl.
@@ -867,7 +867,7 @@ std::string VariableNamer::createIndexName() {
return OldIndex->getName();
}
-/// \brief Determines whether or not the the name \a Symbol conflicts with
+/// Determines whether or not the the name \a Symbol conflicts with
/// language keywords or defined macros. Also checks if the name exists in
/// LoopContext, any of its parent contexts, or any of its child statements.
///
diff --git a/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.h b/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.h
index 3cead294922..9aea8f6ca57 100644
--- a/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.h
+++ b/clang-tools-extra/clang-tidy/modernize/LoopConvertUtils.h
@@ -48,14 +48,14 @@ typedef llvm::DenseMap<const clang::Stmt *, std::string>
/// A vector used to store the AST subtrees of an Expr.
typedef llvm::SmallVector<const clang::Expr *, 16> ComponentVector;
-/// \brief Class used build the reverse AST properties needed to detect
+/// Class used build the reverse AST properties needed to detect
/// name conflicts and free variables.
class StmtAncestorASTVisitor
: public clang::RecursiveASTVisitor<StmtAncestorASTVisitor> {
public:
StmtAncestorASTVisitor() { StmtStack.push_back(nullptr); }
- /// \brief Run the analysis on the AST.
+ /// Run the analysis on the AST.
///
/// In case we're running this analysis multiple times, don't repeat the work.
void gatherAncestors(ASTContext &Ctx) {
@@ -116,7 +116,7 @@ public:
: StmtParents(StmtParents), DeclParents(DeclParents),
ContainingStmt(ContainingStmt), ReplacedVars(ReplacedVars) {}
- /// \brief Run the analysis on Body, and return true iff the expression
+ /// Run the analysis on Body, and return true iff the expression
/// depends on some variable declared within ContainingStmt.
///
/// This is intended to protect against hoisting the container expression
@@ -200,7 +200,7 @@ private:
bool VisitTypeLoc(clang::TypeLoc TL);
};
-/// \brief The information needed to describe a valid convertible usage
+/// The information needed to describe a valid convertible usage
/// of an array index or iterator.
struct Usage {
enum UsageKind {
@@ -238,7 +238,7 @@ struct Usage {
: Expression(E), Kind(Kind), Range(std::move(Range)) {}
};
-/// \brief A class to encapsulate lowering of the tool's confidence level.
+/// A class to encapsulate lowering of the tool's confidence level.
class Confidence {
public:
enum Level {
@@ -251,15 +251,15 @@ public:
// Transformations that will not change semantics.
CL_Safe
};
- /// \brief Initialize confidence level.
+ /// Initialize confidence level.
explicit Confidence(Confidence::Level Level) : CurrentLevel(Level) {}
- /// \brief Lower the internal confidence level to Level, but do not raise it.
+ /// Lower the internal confidence level to Level, but do not raise it.
void lowerTo(Confidence::Level Level) {
CurrentLevel = std::min(Level, CurrentLevel);
}
- /// \brief Return the internal confidence level.
+ /// Return the internal confidence level.
Level getLevel() const { return CurrentLevel; }
private:
@@ -275,7 +275,7 @@ bool areSameExpr(ASTContext *Context, const Expr *First, const Expr *Second);
const DeclRefExpr *getDeclRef(const Expr *E);
bool areSameVariable(const ValueDecl *First, const ValueDecl *Second);
-/// \brief Discover usages of expressions consisting of index or iterator
+/// Discover usages of expressions consisting of index or iterator
/// access.
///
/// Given an index variable, recursively crawls a for loop to discover if the
@@ -288,7 +288,7 @@ public:
const Expr *ArrayBoundExpr,
bool ContainerNeedsDereference);
- /// \brief Finds all uses of IndexVar in Body, placing all usages in Usages,
+ /// Finds all uses of IndexVar in Body, placing all usages in Usages,
/// and returns true if IndexVar was only used in a way consistent with a
/// range-based for loop.
///
@@ -301,35 +301,35 @@ public:
/// function and in overloaded operator[].
bool findAndVerifyUsages(const Stmt *Body);
- /// \brief Add a set of components that we should consider relevant to the
+ /// Add a set of components that we should consider relevant to the
/// container.
void addComponents(const ComponentVector &Components);
- /// \brief Accessor for Usages.
+ /// Accessor for Usages.
const UsageResult &getUsages() const { return Usages; }
- /// \brief Adds the Usage if it was not added before.
+ /// Adds the Usage if it was not added before.
void addUsage(const Usage &U);
- /// \brief Get the container indexed by IndexVar, if any.
+ /// Get the container indexed by IndexVar, if any.
const Expr *getContainerIndexed() const { return ContainerExpr; }
- /// \brief Returns the statement declaring the variable created as an alias
+ /// Returns the statement declaring the variable created as an alias
/// for the loop element, if any.
const DeclStmt *getAliasDecl() const { return AliasDecl; }
- /// \brief Accessor for ConfidenceLevel.
+ /// Accessor for ConfidenceLevel.
Confidence::Level getConfidenceLevel() const {
return ConfidenceLevel.getLevel();
}
- /// \brief Indicates if the alias declaration was in a place where it cannot
+ /// Indicates if the alias declaration was in a place where it cannot
/// simply be removed but rather replaced with a use of the alias variable.
/// For example, variables declared in the condition of an if, switch, or for
/// stmt.
bool aliasUseRequired() const { return ReplaceWithAliasUse; }
- /// \brief Indicates if the alias declaration came from the init clause of a
+ /// Indicates if the alias declaration came from the init clause of a
/// nested for loop. SourceRanges provided by Clang for DeclStmts in this
/// case need to be adjusted.
bool aliasFromForInit() const { return AliasFromForInit; }
@@ -351,7 +351,7 @@ private:
bool VisitDeclStmt(DeclStmt *S);
bool TraverseStmt(Stmt *S);
- /// \brief Add an expression to the list of expressions on which the container
+ /// Add an expression to the list of expressions on which the container
/// expression depends.
void addComponent(const Expr *E);
@@ -376,7 +376,7 @@ private:
/// The DeclStmt for an alias to the container element.
const DeclStmt *AliasDecl;
Confidence ConfidenceLevel;
- /// \brief A list of expressions on which ContainerExpr depends.
+ /// A list of expressions on which ContainerExpr depends.
///
/// If any of these expressions are encountered outside of an acceptable usage
/// of the loop element, lower our confidence level.
@@ -398,7 +398,7 @@ private:
};
struct TUTrackingInfo {
- /// \brief Reset and initialize per-TU tracking information.
+ /// Reset and initialize per-TU tracking information.
///
/// Must be called before using container accessors.
TUTrackingInfo() : ParentFinder(new StmtAncestorASTVisitor) {}
@@ -413,7 +413,7 @@ private:
ReplacedVarsMap ReplacedVars;
};
-/// \brief Create names for generated variables within a particular statement.
+/// Create names for generated variables within a particular statement.
///
/// VariableNamer uses a DeclContext as a reference point, checking for any
/// conflicting declarations higher up in the context or within SourceStmt.
@@ -438,7 +438,7 @@ public:
SourceStmt(SourceStmt), OldIndex(OldIndex), TheContainer(TheContainer),
Context(Context), Style(Style) {}
- /// \brief Generate a new index name.
+ /// Generate a new index name.
///
/// Generates the name to be used for an inserted iterator. It relies on
/// declarationExists() to determine that there are no naming conflicts, and
diff --git a/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp b/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp
index a08aa2ba6fc..e3c7d1d83e6 100644
--- a/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp
@@ -23,7 +23,7 @@ namespace tidy {
namespace modernize {
namespace {
-/// \brief Matches move-constructible classes.
+/// Matches move-constructible classes.
///
/// Given
/// \code
@@ -54,12 +54,12 @@ static TypeMatcher nonConstValueType() {
return qualType(unless(anyOf(referenceType(), isConstQualified())));
}
-/// \brief Whether or not \p ParamDecl is used exactly one time in \p Ctor.
+/// Whether or not \p ParamDecl is used exactly one time in \p Ctor.
///
/// Checks both in the init-list and the body of the constructor.
static bool paramReferredExactlyOnce(const CXXConstructorDecl *Ctor,
const ParmVarDecl *ParamDecl) {
- /// \brief \c clang::RecursiveASTVisitor that checks that the given
+ /// \c clang::RecursiveASTVisitor that checks that the given
/// \c ParmVarDecl is used exactly one time.
///
/// \see ExactlyOneUsageVisitor::hasExactlyOneUsageIn()
@@ -71,7 +71,7 @@ static bool paramReferredExactlyOnce(const CXXConstructorDecl *Ctor,
ExactlyOneUsageVisitor(const ParmVarDecl *ParamDecl)
: ParamDecl(ParamDecl) {}
- /// \brief Whether or not the parameter variable is referred only once in
+ /// Whether or not the parameter variable is referred only once in
/// the
/// given constructor.
bool hasExactlyOneUsageIn(const CXXConstructorDecl *Ctor) {
@@ -81,7 +81,7 @@ static bool paramReferredExactlyOnce(const CXXConstructorDecl *Ctor,
}
private:
- /// \brief Counts the number of references to a variable.
+ /// Counts the number of references to a variable.
///
/// Stops the AST traversal if more than one usage is found.
bool VisitDeclRefExpr(DeclRefExpr *D) {
@@ -104,7 +104,7 @@ static bool paramReferredExactlyOnce(const CXXConstructorDecl *Ctor,
return ExactlyOneUsageVisitor(ParamDecl).hasExactlyOneUsageIn(Ctor);
}
-/// \brief Find all references to \p ParamDecl across all of the
+/// Find all references to \p ParamDecl across all of the
/// redeclarations of \p Ctor.
static SmallVector<const ParmVarDecl *, 2>
collectParamDecls(const CXXConstructorDecl *Ctor,
diff --git a/clang-tools-extra/clang-tidy/modernize/RedundantVoidArgCheck.h b/clang-tools-extra/clang-tidy/modernize/RedundantVoidArgCheck.h
index eca7085f4e4..8b61511196b 100644
--- a/clang-tools-extra/clang-tidy/modernize/RedundantVoidArgCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/RedundantVoidArgCheck.h
@@ -18,7 +18,7 @@ namespace clang {
namespace tidy {
namespace modernize {
-/// \brief Find and remove redundant void argument lists.
+/// Find and remove redundant void argument lists.
///
/// Examples:
/// `int f(void);` becomes `int f();`
diff --git a/clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp b/clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp
index 9551b128d7c..8a2d7f028d4 100644
--- a/clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp
@@ -24,7 +24,7 @@ namespace {
static const char AutoPtrTokenId[] = "AutoPrTokenId";
static const char AutoPtrOwnershipTransferId[] = "AutoPtrOwnershipTransferId";
-/// \brief Matches expressions that are lvalues.
+/// Matches expressions that are lvalues.
///
/// In the following example, a[0] matches expr(isLValue()):
/// \code
diff --git a/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp
index e9f54f814cd..5cab62946d1 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/UseAutoCheck.cpp
@@ -55,7 +55,7 @@ size_t GetTypeNameLength(bool RemoveStars, StringRef Text) {
return NumChars;
}
-/// \brief Matches variable declarations that have explicit initializers that
+/// Matches variable declarations that have explicit initializers that
/// are not initializer lists.
///
/// Given
@@ -84,7 +84,7 @@ AST_MATCHER(VarDecl, hasWrittenNonListInitializer) {
return Node.getInitStyle() != VarDecl::ListInit;
}
-/// \brief Matches QualTypes that are type sugar for QualTypes that match \c
+/// Matches QualTypes that are type sugar for QualTypes that match \c
/// SugarMatcher.
///
/// Given
@@ -109,7 +109,7 @@ AST_MATCHER_P(QualType, isSugarFor, Matcher<QualType>, SugarMatcher) {
}
}
-/// \brief Matches named declarations that have one of the standard iterator
+/// Matches named declarations that have one of the standard iterator
/// names: iterator, reverse_iterator, const_iterator, const_reverse_iterator.
///
/// Given
@@ -131,7 +131,7 @@ AST_MATCHER(NamedDecl, hasStdIteratorName) {
return false;
}
-/// \brief Matches named declarations that have one of the standard container
+/// Matches named declarations that have one of the standard container
/// names.
///
/// Given
@@ -207,7 +207,7 @@ AST_POLYMORPHIC_MATCHER(hasExplicitTemplateArgs,
return Node.hasExplicitTemplateArgs();
}
-/// \brief Returns a DeclarationMatcher that matches standard iterators nested
+/// Returns a DeclarationMatcher that matches standard iterators nested
/// inside records with a standard container name.
DeclarationMatcher standardIterator() {
return decl(
@@ -215,19 +215,19 @@ DeclarationMatcher standardIterator() {
hasDeclContext(recordDecl(hasStdContainerName(), isFromStdNamespace())));
}
-/// \brief Returns a TypeMatcher that matches typedefs for standard iterators
+/// Returns a TypeMatcher that matches typedefs for standard iterators
/// inside records with a standard container name.
TypeMatcher typedefIterator() {
return typedefType(hasDeclaration(standardIterator()));
}
-/// \brief Returns a TypeMatcher that matches records named for standard
+/// Returns a TypeMatcher that matches records named for standard
/// iterators nested inside records named for standard containers.
TypeMatcher nestedIterator() {
return recordType(hasDeclaration(standardIterator()));
}
-/// \brief Returns a TypeMatcher that matches types declared with using
+/// Returns a TypeMatcher that matches types declared with using
/// declarations and which name standard iterators for standard containers.
TypeMatcher iteratorFromUsingDeclaration() {
auto HasIteratorDecl = hasDeclaration(namedDecl(hasStdIteratorName()));
@@ -243,7 +243,7 @@ TypeMatcher iteratorFromUsingDeclaration() {
anyOf(typedefType(HasIteratorDecl), recordType(HasIteratorDecl))));
}
-/// \brief This matcher returns declaration statements that contain variable
+/// This matcher returns declaration statements that contain variable
/// declarations with written non-list initializer for standard iterators.
StatementMatcher makeIteratorDeclMatcher() {
return declStmt(unless(has(
diff --git a/clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp
index ae6f91c838b..991eada514d 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp
@@ -19,7 +19,7 @@ namespace modernize {
static const char SpecialFunction[] = "SpecialFunction";
-/// \brief Finds all the named non-static fields of \p Record.
+/// Finds all the named non-static fields of \p Record.
static std::set<const FieldDecl *>
getAllNamedFields(const CXXRecordDecl *Record) {
std::set<const FieldDecl *> Result;
@@ -32,7 +32,7 @@ getAllNamedFields(const CXXRecordDecl *Record) {
return Result;
}
-/// \brief Returns the names of the direct bases of \p Record, both virtual and
+/// Returns the names of the direct bases of \p Record, both virtual and
/// non-virtual.
static std::set<const Type *> getAllDirectBases(const CXXRecordDecl *Record) {
std::set<const Type *> Result;
@@ -44,7 +44,7 @@ static std::set<const Type *> getAllDirectBases(const CXXRecordDecl *Record) {
return Result;
}
-/// \brief Returns a matcher that matches member expressions where the base is
+/// Returns a matcher that matches member expressions where the base is
/// the variable declared as \p Var and the accessed member is the one declared
/// as \p Field.
internal::Matcher<Expr> accessToFieldInVar(const FieldDecl *Field,
@@ -54,7 +54,7 @@ internal::Matcher<Expr> accessToFieldInVar(const FieldDecl *Field,
member(fieldDecl(equalsNode(Field)))));
}
-/// \brief Check that the given constructor has copy signature and that it
+/// Check that the given constructor has copy signature and that it
/// copy-initializes all its bases and members.
static bool isCopyConstructorAndCanBeDefaulted(ASTContext *Context,
const CXXConstructorDecl *Ctor) {
@@ -111,7 +111,7 @@ static bool isCopyConstructorAndCanBeDefaulted(ASTContext *Context,
BasesToInit.size() + FieldsToInit.size();
}
-/// \brief Checks that the given method is an overloading of the assignment
+/// Checks that the given method is an overloading of the assignment
/// operator, has copy signature, returns a reference to "*this" and copies
/// all its members and subobjects.
static bool isCopyAssignmentAndCanBeDefaulted(ASTContext *Context,
@@ -187,7 +187,7 @@ static bool isCopyAssignmentAndCanBeDefaulted(ASTContext *Context,
return Compound->size() == BasesToInit.size() + FieldsToInit.size() + 1;
}
-/// \brief Returns false if the body has any non-whitespace character.
+/// Returns false if the body has any non-whitespace character.
static bool bodyEmpty(const ASTContext *Context, const CompoundStmt *Body) {
bool Invalid = false;
StringRef Text = Lexer::getSourceText(
diff --git a/clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.h b/clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.h
index 014b90c9a84..4e2f1f81b9a 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.h
@@ -15,7 +15,7 @@ namespace clang {
namespace tidy {
namespace modernize {
-/// \brief Replace default bodies of special member functions with '= default;'.
+/// Replace default bodies of special member functions with '= default;'.
/// \code
/// struct A {
/// A() {}
diff --git a/clang-tools-extra/clang-tidy/modernize/UseEqualsDeleteCheck.h b/clang-tools-extra/clang-tidy/modernize/UseEqualsDeleteCheck.h
index b6cd010b9bc..f474196d060 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseEqualsDeleteCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/UseEqualsDeleteCheck.h
@@ -15,7 +15,7 @@ namespace clang {
namespace tidy {
namespace modernize {
-/// \brief Mark unimplemented private special member functions with '= delete'.
+/// Mark unimplemented private special member functions with '= delete'.
/// \code
/// struct A {
/// private:
diff --git a/clang-tools-extra/clang-tidy/modernize/UseNodiscardCheck.h b/clang-tools-extra/clang-tidy/modernize/UseNodiscardCheck.h
index 325e5f8875a..2a8391c2431 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseNodiscardCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/UseNodiscardCheck.h
@@ -15,7 +15,7 @@ namespace clang {
namespace tidy {
namespace modernize {
-/// \brief Add ``[[nodiscard]]`` to non-void const-member functions with no
+/// Add ``[[nodiscard]]`` to non-void const-member functions with no
/// arguments or pass-by-value or pass by const-reference arguments.
/// \code
/// bool empty() const;
diff --git a/clang-tools-extra/clang-tidy/modernize/UseNoexceptCheck.h b/clang-tools-extra/clang-tidy/modernize/UseNoexceptCheck.h
index 828eb5728d2..854af0ac1dc 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseNoexceptCheck.h
+++ b/clang-tools-extra/clang-tidy/modernize/UseNoexceptCheck.h
@@ -15,7 +15,7 @@ namespace clang {
namespace tidy {
namespace modernize {
-/// \brief Replace dynamic exception specifications, with
+/// Replace dynamic exception specifications, with
/// `noexcept` (or user-defined macro) or `noexcept(false)`.
/// \code
/// void foo() throw();
diff --git a/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
index d0a95d95ec4..27e85968722 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/UseNullptrCheck.cpp
@@ -30,7 +30,7 @@ AST_MATCHER(Type, sugaredNullptrType) {
return false;
}
-/// \brief Create a matcher that finds implicit casts as well as the head of a
+/// 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.
/// Finding sequences of explict casts is necessary so that an entire sequence
@@ -52,7 +52,7 @@ bool isReplaceableRange(SourceLocation StartLoc, SourceLocation EndLoc,
return SM.isWrittenInSameFile(StartLoc, EndLoc);
}
-/// \brief Replaces the provided range with the text "nullptr", but only if
+/// Replaces the provided range with the text "nullptr", but only if
/// the start and end location are both in main file.
/// Returns true if and only if a replacement was made.
void replaceWithNullptr(ClangTidyCheck &Check, SourceManager &SM,
@@ -67,7 +67,7 @@ void replaceWithNullptr(ClangTidyCheck &Check, SourceManager &SM,
Range, NeedsSpace ? " nullptr" : "nullptr");
}
-/// \brief Returns the name of the outermost macro.
+/// Returns the name of the outermost macro.
///
/// Given
/// \code
@@ -87,7 +87,7 @@ StringRef getOutermostMacroName(SourceLocation Loc, const SourceManager &SM,
return Lexer::getImmediateMacroName(OutermostMacroLoc, SM, LO);
}
-/// \brief RecursiveASTVisitor for ensuring all nodes rooted at a given AST
+/// RecursiveASTVisitor for ensuring all nodes rooted at a given AST
/// subtree that have file-level source locations corresponding to a macro
/// argument have implicit NullTo(Member)Pointer nodes as ancestors.
class MacroArgUsageVisitor : public RecursiveASTVisitor<MacroArgUsageVisitor> {
@@ -157,7 +157,7 @@ private:
bool InvalidFound;
};
-/// \brief Looks for implicit casts as well as sequences of 0 or more explicit
+/// Looks for implicit casts as well as sequences of 0 or more explicit
/// casts with an implicit null-to-pointer cast within.
///
/// The matcher this visitor is used with will find a single implicit cast or a
@@ -263,7 +263,7 @@ private:
return true;
}
- /// \brief Tests that all expansions of a macro arg, one of which expands to
+ /// Tests that all expansions of a macro arg, one of which expands to
/// result in \p CE, yield NullTo(Member)Pointer casts.
bool allArgUsesValid(const CastExpr *CE) {
SourceLocation CastLoc = CE->getBeginLoc();
@@ -297,7 +297,7 @@ private:
return !ArgUsageVisitor.foundInvalid();
}
- /// \brief Given the SourceLocation for a macro arg expansion, finds the
+ /// Given the SourceLocation for a macro arg expansion, finds the
/// non-macro SourceLocation of the macro the arg was passed to and the
/// non-macro SourceLocation of the argument in the arg list to that macro.
/// These results are returned via \c MacroLoc and \c ArgLoc respectively.
@@ -347,7 +347,7 @@ private:
llvm_unreachable("getMacroAndArgLocations");
}
- /// \brief Tests if TestMacroLoc is found while recursively unravelling
+ /// Tests if TestMacroLoc is found while recursively unravelling
/// expansions starting at TestLoc. TestMacroLoc.isFileID() must be true.
/// Implementation is very similar to getMacroAndArgLocations() except in this
/// case, it's not assumed that TestLoc is expanded from a macro argument.
@@ -400,7 +400,7 @@ private:
llvm_unreachable("expandsFrom");
}
- /// \brief Given a starting point \c Start in the AST, find an ancestor that
+ /// Given a starting point \c Start in the AST, find an ancestor that
/// doesn't expand from the macro called at file location \c MacroLoc.
///
/// \pre MacroLoc.isFileID()
OpenPOWER on IntegriCloud