forked from OSchip/llvm-project
clang-tidy/ArgumentCommentCheck: Initializer list in non-static members is unavailable on msc17.
llvm-svn: 204121
This commit is contained in:
parent
27dc839406
commit
afc4965d4d
|
@ -21,6 +21,9 @@ using namespace clang::ast_matchers;
|
|||
namespace clang {
|
||||
namespace tidy {
|
||||
|
||||
ArgumentCommentCheck::ArgumentCommentCheck()
|
||||
: IdentRE("^(/\\* *)([_A-Za-z][_A-Za-z0-9]*)( *= *\\*/)$") {}
|
||||
|
||||
void ArgumentCommentCheck::registerMatchers(MatchFinder *Finder) {
|
||||
Finder->addMatcher(callExpr(unless(operatorCallExpr())).bind("expr"), this);
|
||||
Finder->addMatcher(constructExpr().bind("expr"), this);
|
||||
|
|
|
@ -19,11 +19,13 @@ namespace tidy {
|
|||
/// \brief Checks that argument comments match parameter names.
|
||||
class ArgumentCommentCheck : public ClangTidyCheck {
|
||||
public:
|
||||
ArgumentCommentCheck();
|
||||
|
||||
void registerMatchers(ast_matchers::MatchFinder *Finder) override;
|
||||
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
|
||||
|
||||
private:
|
||||
llvm::Regex IdentRE{ "^(/\\* *)([_A-Za-z][_A-Za-z0-9]*)( *= *\\*/)$" };
|
||||
llvm::Regex IdentRE;
|
||||
|
||||
bool isLikelyTypo(llvm::ArrayRef<ParmVarDecl *> Params, StringRef ArgName,
|
||||
unsigned ArgIndex);
|
||||
|
|
Loading…
Reference in New Issue