aboutsummaryrefslogtreecommitdiff
path: root/clang-tidy/bugprone/ArgumentCommentCheck.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tidy/bugprone/ArgumentCommentCheck.h')
-rw-r--r--clang-tidy/bugprone/ArgumentCommentCheck.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/clang-tidy/bugprone/ArgumentCommentCheck.h b/clang-tidy/bugprone/ArgumentCommentCheck.h
index 2eee74d6..451b309c 100644
--- a/clang-tidy/bugprone/ArgumentCommentCheck.h
+++ b/clang-tidy/bugprone/ArgumentCommentCheck.h
@@ -26,7 +26,8 @@ namespace bugprone {
///
/// ...
/// f(/*bar=*/true);
-/// // warning: argument name 'bar' in comment does not match parameter name 'foo'
+/// // warning: argument name 'bar' in comment does not match parameter name
+/// 'foo'
/// \endcode
///
/// The check tries to detect typos and suggest automated fixes for them.
@@ -39,12 +40,21 @@ public:
void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
private:
- const bool StrictMode;
+ const unsigned StrictMode : 1;
+ const unsigned CommentBoolLiterals : 1;
+ const unsigned CommentIntegerLiterals : 1;
+ const unsigned CommentFloatLiterals : 1;
+ const unsigned CommentStringLiterals : 1;
+ const unsigned CommentUserDefinedLiterals : 1;
+ const unsigned CommentCharacterLiterals : 1;
+ const unsigned CommentNullPtrs : 1;
llvm::Regex IdentRE;
void checkCallArgs(ASTContext *Ctx, const FunctionDecl *Callee,
SourceLocation ArgBeginLoc,
llvm::ArrayRef<const Expr *> Args);
+
+ bool shouldAddComment(const Expr *Arg) const;
};
} // namespace bugprone