diff options
author | Adrian Prantl <aprantl@apple.com> | 2018-05-09 01:00:01 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2018-05-09 01:00:01 +0000 |
commit | 9fc8faf9e619733a21915d4c41696f09aa2a7a50 (patch) | |
tree | f35a970439bcea95268071f86c04a93d09fdabeb /clang/lib/Analysis | |
parent | cfa98548307264f29ec447e24452117b72bcb517 (diff) | |
download | bcm5719-llvm-9fc8faf9e619733a21915d4c41696f09aa2a7a50.tar.gz bcm5719-llvm-9fc8faf9e619733a21915d4c41696f09aa2a7a50.zip |
Remove \brief commands from doxygen comments.
This is similar to the LLVM change https://reviews.llvm.org/D46290.
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
for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done
Differential Revision: https://reviews.llvm.org/D46320
llvm-svn: 331834
Diffstat (limited to 'clang/lib/Analysis')
-rw-r--r-- | clang/lib/Analysis/CFG.cpp | 8 | ||||
-rw-r--r-- | clang/lib/Analysis/ThreadSafety.cpp | 46 | ||||
-rw-r--r-- | clang/lib/Analysis/ThreadSafetyCommon.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Analysis/UninitializedValues.cpp | 2 |
4 files changed, 30 insertions, 30 deletions
diff --git a/clang/lib/Analysis/CFG.cpp b/clang/lib/Analysis/CFG.cpp index f53fc0f9bc0..597bdd2b228 100644 --- a/clang/lib/Analysis/CFG.cpp +++ b/clang/lib/Analysis/CFG.cpp @@ -851,7 +851,7 @@ private: B->prependScopeEnd(VD, S, cfg->getBumpVectorContext()); } - /// \brief Find a relational comparison with an expression evaluating to a + /// Find a relational comparison with an expression evaluating to a /// boolean and a constant other than 0 and 1. /// e.g. if ((x < y) == 10) TryResult checkIncorrectRelationalOperator(const BinaryOperator *B) { @@ -964,7 +964,7 @@ private: } } - /// \brief Find a pair of comparison expressions with or without parentheses + /// Find a pair of comparison expressions with or without parentheses /// with a shared variable and constants and a logical operator between them /// that always evaluates to either true or false. /// e.g. if (x != 3 || x != 4) @@ -1120,7 +1120,7 @@ private: return evaluateAsBooleanConditionNoCache(S); } - /// \brief Evaluate as boolean \param E without using the cache. + /// Evaluate as boolean \param E without using the cache. TryResult evaluateAsBooleanConditionNoCache(Expr *E) { if (BinaryOperator *Bop = dyn_cast<BinaryOperator>(E)) { if (Bop->isLogicalOp()) { @@ -1491,7 +1491,7 @@ CFGBlock *CFGBuilder::addInitializer(CXXCtorInitializer *I) { return Block; } -/// \brief Retrieve the type of the temporary object whose lifetime was +/// Retrieve the type of the temporary object whose lifetime was /// extended by a local reference with the given initializer. static QualType getReferenceInitTemporaryType(ASTContext &Context, const Expr *Init, diff --git a/clang/lib/Analysis/ThreadSafety.cpp b/clang/lib/Analysis/ThreadSafety.cpp index 0456df20ac7..8895dec02b9 100644 --- a/clang/lib/Analysis/ThreadSafety.cpp +++ b/clang/lib/Analysis/ThreadSafety.cpp @@ -86,11 +86,11 @@ static void warnInvalidLock(ThreadSafetyHandler &Handler, namespace { -/// \brief A set of CapabilityInfo objects, which are compiled from the +/// A set of CapabilityInfo objects, which are compiled from the /// requires attributes on a function. class CapExprSet : public SmallVector<CapabilityExpr, 4> { public: - /// \brief Push M onto list, but discard duplicates. + /// Push M onto list, but discard duplicates. void push_back_nodup(const CapabilityExpr &CapE) { iterator It = std::find_if(begin(), end(), [=](const CapabilityExpr &CapE2) { @@ -104,7 +104,7 @@ public: class FactManager; class FactSet; -/// \brief This is a helper class that stores a fact that is known at a +/// This is a helper class that stores a fact that is known at a /// particular point in program execution. Currently, a fact is a capability, /// along with additional information, such as where it was acquired, whether /// it is exclusive or shared, etc. @@ -157,7 +157,7 @@ public: using FactID = unsigned short; -/// \brief FactManager manages the memory for all facts that are created during +/// FactManager manages the memory for all facts that are created during /// the analysis of a single routine. class FactManager { private: @@ -173,7 +173,7 @@ public: FactEntry &operator[](FactID F) { return *Facts[F]; } }; -/// \brief A FactSet is the set of facts that are known to be true at a +/// A FactSet is the set of facts that are known to be true at a /// particular program point. FactSets must be small, because they are /// frequently copied, and are thus implemented as a set of indices into a /// table maintained by a FactManager. A typical FactSet only holds 1 or 2 @@ -948,7 +948,7 @@ public: } }; -/// \brief Class which implements the core thread safety analysis routines. +/// Class which implements the core thread safety analysis routines. class ThreadSafetyAnalyzer { friend class BuildLockset; friend class threadSafety::BeforeSet; @@ -1130,7 +1130,7 @@ void BeforeSet::checkBeforeAfter(const ValueDecl* StartVd, Info->Visited = 0; } -/// \brief Gets the value decl pointer from DeclRefExprs or MemberExprs. +/// Gets the value decl pointer from DeclRefExprs or MemberExprs. static const ValueDecl *getValueDecl(const Expr *Exp) { if (const auto *CE = dyn_cast<ImplicitCastExpr>(Exp)) return getValueDecl(CE->getSubExpr()); @@ -1223,7 +1223,7 @@ bool ThreadSafetyAnalyzer::inCurrentScope(const CapabilityExpr &CapE) { return false; } -/// \brief Add a new lock to the lockset, warning if the lock is already there. +/// Add a new lock to the lockset, warning if the lock is already there. /// \param ReqAttr -- true if this is part of an initial Requires attribute. void ThreadSafetyAnalyzer::addLock(FactSet &FSet, std::unique_ptr<FactEntry> Entry, @@ -1261,7 +1261,7 @@ void ThreadSafetyAnalyzer::addLock(FactSet &FSet, } } -/// \brief Remove a lock from the lockset, warning if the lock is not there. +/// Remove a lock from the lockset, warning if the lock is not there. /// \param UnlockLoc The source location of the unlock (only used in error msg) void ThreadSafetyAnalyzer::removeLock(FactSet &FSet, const CapabilityExpr &Cp, SourceLocation UnlockLoc, @@ -1287,7 +1287,7 @@ void ThreadSafetyAnalyzer::removeLock(FactSet &FSet, const CapabilityExpr &Cp, DiagKind); } -/// \brief Extract the list of mutexIDs from the attribute on an expression, +/// Extract the list of mutexIDs from the attribute on an expression, /// and push them onto Mtxs, discarding any duplicates. template <typename AttrType> void ThreadSafetyAnalyzer::getMutexIDs(CapExprSet &Mtxs, AttrType *Attr, @@ -1318,7 +1318,7 @@ void ThreadSafetyAnalyzer::getMutexIDs(CapExprSet &Mtxs, AttrType *Attr, } } -/// \brief Extract the list of mutexIDs from a trylock attribute. If the +/// Extract the list of mutexIDs from a trylock attribute. If the /// trylock applies to the given edge, then push them onto Mtxs, discarding /// any duplicates. template <class AttrType> @@ -1418,7 +1418,7 @@ const CallExpr* ThreadSafetyAnalyzer::getTrylockCallExpr(const Stmt *Cond, return nullptr; } -/// \brief Find the lockset that holds on the edge between PredBlock +/// Find the lockset that holds on the edge between PredBlock /// and CurrBlock. The edge set is the exit set of PredBlock (passed /// as the ExitSet parameter) plus any trylocks, which are conditionally held. void ThreadSafetyAnalyzer::getEdgeLockset(FactSet& Result, @@ -1491,7 +1491,7 @@ void ThreadSafetyAnalyzer::getEdgeLockset(FactSet& Result, namespace { -/// \brief We use this class to visit different types of expressions in +/// We use this class to visit different types of expressions in /// CFGBlocks, and build up the lockset. /// An expression may cause us to add or remove locks from the lockset, or else /// output error messages related to missing locks. @@ -1533,7 +1533,7 @@ public: } // namespace -/// \brief Warn if the LSet does not contain a lock sufficient to protect access +/// Warn if the LSet does not contain a lock sufficient to protect access /// of at least the passed in AccessKind. void BuildLockset::warnIfMutexNotHeld(const NamedDecl *D, const Expr *Exp, AccessKind AK, Expr *MutexExp, @@ -1597,7 +1597,7 @@ void BuildLockset::warnIfMutexNotHeld(const NamedDecl *D, const Expr *Exp, } } -/// \brief Warn if the LSet contains the given lock. +/// Warn if the LSet contains the given lock. void BuildLockset::warnIfMutexHeld(const NamedDecl *D, const Expr *Exp, Expr *MutexExp, StringRef DiagKind) { CapabilityExpr Cp = Analyzer->SxBuilder.translateAttrExpr(MutexExp, D, Exp); @@ -1615,7 +1615,7 @@ void BuildLockset::warnIfMutexHeld(const NamedDecl *D, const Expr *Exp, } } -/// \brief Checks guarded_by and pt_guarded_by attributes. +/// Checks guarded_by and pt_guarded_by attributes. /// Whenever we identify an access (read or write) to a DeclRefExpr that is /// marked with guarded_by, we must ensure the appropriate mutexes are held. /// Similarly, we check if the access is to an expression that dereferences @@ -1671,7 +1671,7 @@ void BuildLockset::checkAccess(const Expr *Exp, AccessKind AK, ClassifyDiagnostic(I), Loc); } -/// \brief Checks pt_guarded_by and pt_guarded_var attributes. +/// Checks pt_guarded_by and pt_guarded_var attributes. /// POK is the same operationKind that was passed to checkAccess. void BuildLockset::checkPtAccess(const Expr *Exp, AccessKind AK, ProtectedOperationKind POK) { @@ -1710,7 +1710,7 @@ void BuildLockset::checkPtAccess(const Expr *Exp, AccessKind AK, ClassifyDiagnostic(I), Exp->getExprLoc()); } -/// \brief Process a function call, method call, constructor call, +/// Process a function call, method call, constructor call, /// or destructor call. This involves looking at the attributes on the /// corresponding function/method/constructor/destructor, issuing warnings, /// and updating the locksets accordingly. @@ -1876,7 +1876,7 @@ void BuildLockset::handleCall(Expr *Exp, const NamedDecl *D, VarDecl *VD) { Analyzer->removeLock(FSet, M, Loc, Dtor, LK_Generic, CapDiagKind); } -/// \brief For unary operations which read and write a variable, we need to +/// For unary operations which read and write a variable, we need to /// check whether we hold any required mutexes. Reads are checked in /// VisitCastExpr. void BuildLockset::VisitUnaryOperator(UnaryOperator *UO) { @@ -2089,7 +2089,7 @@ void BuildLockset::VisitDeclStmt(DeclStmt *S) { } } -/// \brief Compute the intersection of two locksets and issue warnings for any +/// Compute the intersection of two locksets and issue warnings for any /// locks in the symmetric difference. /// /// This function is used at a merge point in the CFG when comparing the lockset @@ -2166,7 +2166,7 @@ static bool neverReturns(const CFGBlock *B) { return false; } -/// \brief Check a function's CFG for thread-safety violations. +/// Check a function's CFG for thread-safety violations. /// /// We traverse the blocks in the CFG, compute the set of mutexes that are held /// at the end of each block, and issue warnings for thread safety violations. @@ -2462,7 +2462,7 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) { Handler.leaveFunction(CurrentFunction); } -/// \brief Check a function's CFG for thread-safety violations. +/// Check a function's CFG for thread-safety violations. /// /// We traverse the blocks in the CFG, compute the set of mutexes that are held /// at the end of each block, and issue warnings for thread safety violations. @@ -2478,7 +2478,7 @@ void threadSafety::runThreadSafetyAnalysis(AnalysisDeclContext &AC, void threadSafety::threadSafetyCleanup(BeforeSet *Cache) { delete Cache; } -/// \brief Helper function that returns a LockKind required for the given level +/// Helper function that returns a LockKind required for the given level /// of access. LockKind threadSafety::getLockKindFromAccessKind(AccessKind AK) { switch (AK) { diff --git a/clang/lib/Analysis/ThreadSafetyCommon.cpp b/clang/lib/Analysis/ThreadSafetyCommon.cpp index 07e3a75e1a4..fced17ff919 100644 --- a/clang/lib/Analysis/ThreadSafetyCommon.cpp +++ b/clang/lib/Analysis/ThreadSafetyCommon.cpp @@ -86,7 +86,7 @@ static bool isCalleeArrow(const Expr *E) { return ME ? ME->isArrow() : false; } -/// \brief Translate a clang expression in an attribute to a til::SExpr. +/// Translate a clang expression in an attribute to a til::SExpr. /// Constructs the context from D, DeclExp, and SelfDecl. /// /// \param AttrExp The expression to translate. @@ -146,7 +146,7 @@ CapabilityExpr SExprBuilder::translateAttrExpr(const Expr *AttrExp, return translateAttrExpr(AttrExp, &Ctx); } -/// \brief Translate a clang expression in an attribute to a til::SExpr. +/// Translate a clang expression in an attribute to a til::SExpr. // This assumes a CallingContext has already been created. CapabilityExpr SExprBuilder::translateAttrExpr(const Expr *AttrExp, CallingContext *Ctx) { diff --git a/clang/lib/Analysis/UninitializedValues.cpp b/clang/lib/Analysis/UninitializedValues.cpp index feccf844d00..63353292349 100644 --- a/clang/lib/Analysis/UninitializedValues.cpp +++ b/clang/lib/Analysis/UninitializedValues.cpp @@ -321,7 +321,7 @@ static FindVarResult findVar(const Expr *E, const DeclContext *DC) { namespace { -/// \brief Classify each DeclRefExpr as an initialization or a use. Any +/// Classify each DeclRefExpr as an initialization or a use. Any /// DeclRefExpr which isn't explicitly classified will be assumed to have /// escaped the analysis and will be treated as an initialization. class ClassifyRefs : public StmtVisitor<ClassifyRefs> { |