clang-tidy/ArgumentCommentCheck: Initializer list in non-static members is unavailable on msc17.

llvm-svn: 204121
This commit is contained in:
NAKAMURA Takumi 2014-03-18 07:22:43 +00:00
parent 27dc839406
commit afc4965d4d
2 changed files with 6 additions and 1 deletions

View File

@ -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);

View File

@ -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);