diff options
| author | Leslie Zhai <lesliezhai@llvm.org.cn> | 2017-06-19 01:55:50 +0000 |
|---|---|---|
| committer | Leslie Zhai <lesliezhai@llvm.org.cn> | 2017-06-19 01:55:50 +0000 |
| commit | d91d19e6dc5fa442c39e4f2b517067c67df74f03 (patch) | |
| tree | 4f3afe2e83d9162f9fcd6e5e7e82493d9f0d7547 /clang/lib/StaticAnalyzer/Checkers | |
| parent | 043d3f868291d158f7e24a8a2d9f3ed629aa737b (diff) | |
| download | bcm5719-llvm-d91d19e6dc5fa442c39e4f2b517067c67df74f03.tar.gz bcm5719-llvm-d91d19e6dc5fa442c39e4f2b517067c67df74f03.zip | |
[analyzer] Teach CloneDetection about Qt Meta-Object Compiler
Reviewers: v.g.vassilev, zaks.anna, NoQ, teemperor
Reviewed By: v.g.vassilev, zaks.anna, NoQ, teemperor
Differential Revision: https://reviews.llvm.org/D31320
llvm-svn: 305659
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers')
| -rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp index 1885b0e3920..d0898adf49f 100644 --- a/clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp @@ -73,12 +73,17 @@ void CloneChecker::checkEndOfTranslationUnit(const TranslationUnitDecl *TU, bool ReportNormalClones = Mgr.getAnalyzerOptions().getBooleanOption( "ReportNormalClones", true, this); + StringRef IgnoredFilesPattern = Mgr.getAnalyzerOptions().getOptionAsString( + "IgnoredFilesPattern", "", this); + // Let the CloneDetector create a list of clones from all the analyzed // statements. We don't filter for matching variable patterns at this point // because reportSuspiciousClones() wants to search them for errors. std::vector<CloneDetector::CloneGroup> AllCloneGroups; - Detector.findClones(AllCloneGroups, RecursiveCloneTypeIIConstraint(), + Detector.findClones(AllCloneGroups, + AutoGeneratedCloneConstraint(IgnoredFilesPattern), + RecursiveCloneTypeIIConstraint(), MinComplexityConstraint(MinComplexity), MinGroupSizeConstraint(2), OnlyLargestCloneConstraint()); |

