xiangzhai created this revision. Herald added a subscriber: xazax.hun. Hi LLVM developers,
As Raphael suggested in https://reviews.llvm.org/D31320 I renamed `AutoGeneratedCloneConstraint` to `FilenamePatternConstraint`, please review it, thanks a lot! Regards, Leslie Zhai Repository: rL LLVM https://reviews.llvm.org/D34353 Files: include/clang/Analysis/CloneDetection.h lib/Analysis/CloneDetection.cpp lib/StaticAnalyzer/Checkers/CloneChecker.cpp Index: lib/StaticAnalyzer/Checkers/CloneChecker.cpp =================================================================== --- lib/StaticAnalyzer/Checkers/CloneChecker.cpp +++ lib/StaticAnalyzer/Checkers/CloneChecker.cpp @@ -82,7 +82,7 @@ std::vector<CloneDetector::CloneGroup> AllCloneGroups; Detector.findClones(AllCloneGroups, - AutoGeneratedCloneConstraint(IgnoredFilesPattern), + FilenamePatternConstraint(IgnoredFilesPattern), RecursiveCloneTypeIIConstraint(), MinComplexityConstraint(MinComplexity), MinGroupSizeConstraint(2), OnlyLargestCloneConstraint()); Index: lib/Analysis/CloneDetection.cpp =================================================================== --- lib/Analysis/CloneDetection.cpp +++ lib/Analysis/CloneDetection.cpp @@ -366,7 +366,7 @@ } } -bool AutoGeneratedCloneConstraint::isAutoGenerated(const CloneDetector::CloneGroup &Group) { +bool FilenamePatternConstraint::isAutoGenerated(const CloneDetector::CloneGroup &Group) { std::string Error; if (IgnoredFilesPattern.empty() || Group.empty() || !IgnoredFilesRegex->isValid(Error)) Index: include/clang/Analysis/CloneDetection.h =================================================================== --- include/clang/Analysis/CloneDetection.h +++ include/clang/Analysis/CloneDetection.h @@ -321,11 +321,11 @@ void constrain(std::vector<CloneDetector::CloneGroup> &Result); }; -struct AutoGeneratedCloneConstraint { +struct FilenamePatternConstraint { StringRef IgnoredFilesPattern; std::shared_ptr<llvm::Regex> IgnoredFilesRegex; - AutoGeneratedCloneConstraint(StringRef IgnoredFilesPattern) + FilenamePatternConstraint(StringRef IgnoredFilesPattern) : IgnoredFilesPattern(IgnoredFilesPattern) { IgnoredFilesRegex = std::make_shared<llvm::Regex>("^(" + IgnoredFilesPattern.str() + "$)");
Index: lib/StaticAnalyzer/Checkers/CloneChecker.cpp =================================================================== --- lib/StaticAnalyzer/Checkers/CloneChecker.cpp +++ lib/StaticAnalyzer/Checkers/CloneChecker.cpp @@ -82,7 +82,7 @@ std::vector<CloneDetector::CloneGroup> AllCloneGroups; Detector.findClones(AllCloneGroups, - AutoGeneratedCloneConstraint(IgnoredFilesPattern), + FilenamePatternConstraint(IgnoredFilesPattern), RecursiveCloneTypeIIConstraint(), MinComplexityConstraint(MinComplexity), MinGroupSizeConstraint(2), OnlyLargestCloneConstraint()); Index: lib/Analysis/CloneDetection.cpp =================================================================== --- lib/Analysis/CloneDetection.cpp +++ lib/Analysis/CloneDetection.cpp @@ -366,7 +366,7 @@ } } -bool AutoGeneratedCloneConstraint::isAutoGenerated(const CloneDetector::CloneGroup &Group) { +bool FilenamePatternConstraint::isAutoGenerated(const CloneDetector::CloneGroup &Group) { std::string Error; if (IgnoredFilesPattern.empty() || Group.empty() || !IgnoredFilesRegex->isValid(Error)) Index: include/clang/Analysis/CloneDetection.h =================================================================== --- include/clang/Analysis/CloneDetection.h +++ include/clang/Analysis/CloneDetection.h @@ -321,11 +321,11 @@ void constrain(std::vector<CloneDetector::CloneGroup> &Result); }; -struct AutoGeneratedCloneConstraint { +struct FilenamePatternConstraint { StringRef IgnoredFilesPattern; std::shared_ptr<llvm::Regex> IgnoredFilesRegex; - AutoGeneratedCloneConstraint(StringRef IgnoredFilesPattern) + FilenamePatternConstraint(StringRef IgnoredFilesPattern) : IgnoredFilesPattern(IgnoredFilesPattern) { IgnoredFilesRegex = std::make_shared<llvm::Regex>("^(" + IgnoredFilesPattern.str() + "$)");
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits