[clang-tools-extra] r204121 - clang-tidy/ArgumentCommentCheck: Initializer list in non-static members is unavailable on msc17.

NAKAMURA Takumi geek4civic at gmail.com
Tue Mar 18 00:22:43 PDT 2014


Author: chapuni
Date: Tue Mar 18 02:22:43 2014
New Revision: 204121

URL: http://llvm.org/viewvc/llvm-project?rev=204121&view=rev
Log:
clang-tidy/ArgumentCommentCheck: Initializer list in non-static members is unavailable on msc17.

Modified:
    clang-tools-extra/trunk/clang-tidy/misc/ArgumentCommentCheck.cpp
    clang-tools-extra/trunk/clang-tidy/misc/ArgumentCommentCheck.h

Modified: clang-tools-extra/trunk/clang-tidy/misc/ArgumentCommentCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/ArgumentCommentCheck.cpp?rev=204121&r1=204120&r2=204121&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/ArgumentCommentCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/ArgumentCommentCheck.cpp Tue Mar 18 02:22:43 2014
@@ -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);

Modified: clang-tools-extra/trunk/clang-tidy/misc/ArgumentCommentCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/ArgumentCommentCheck.h?rev=204121&r1=204120&r2=204121&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/ArgumentCommentCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/ArgumentCommentCheck.h Tue Mar 18 02:22:43 2014
@@ -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);





More information about the cfe-commits mailing list