[PATCH] D34880: [analyzer] Make StmtDataCollector part of the CloneDetection API

2017-07-02 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment. Yeah, we should move it, but it should land somewhere in a header in `/AST/` so that for example the StmtProfiler could make use of this. I'm open for suggestions here :) https://reviews.llvm.org/D34880 ___ cfe-commits m

[PATCH] D31697: Check for null before using TUScope

2017-07-02 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. > only for the function templates that use Microsoft intrinsics (e.g. > _BitScanForward in TrailingZerosCounter.) > So there's something in the parsing of builtins/intrinsics that requires > TUScope to be non-null. For posterity, this was misdiagnosed on my part. It turn

[PATCH] D34880: [analyzer] Make StmtDataCollector part of the CloneDetection API

2017-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Looks good. To think: maybe we need a better name (and/or a place to live) for this API, now that it's not only related to clone detection, but is useful for more stuff? Comment

[PATCH] D34364: [analyzer] Faster hashing of subsequences in CompoundStmts.

2017-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. This looks negligible compared to compilation time. I wonder if we're now scalable enough to try finding whole-translation-unit clones. Comment at: lib/Analysis/CloneDetection.cpp

[PATCH] D34182: [analyzer] Performance optimizations for the CloneChecker

2017-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Totally makes sense :) Comment at: include/clang/Analysis/CloneDetection.h:258-260 +/// This constraint is also available to be executed in two phases, see +/// RecursiveCloneTypeI

[PATCH] D34178: [analyzer] Increase minimum complexity filter of the CloneChecker.

2017-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Hmm, what else remains to be fixed before we should try to deliver CloneChecker to the users (move out of `alpha`, either on by default or into `optin`)? I think we've had this problem with overlapping clones. I just thought that we could also probably fix it by trying to f

[PATCH] D34927: [Bash-autocompletion] Fix a bug that -foo=bar doesn't handled properly

2017-07-02 Thread Rui Ueyama via Phabricator via cfe-commits
ruiu added inline comments. Comment at: clang/utils/bash-autocomplete.sh:37 arg="$w1=," + elif [[ ${cur:0:1} == '-' && ${cur: -1} == '=' ]]; then +# -foo= I think you can do `"$cur" == -*=`. https://reviews.llvm.org/D34927 _

[PATCH] D34178: [analyzer] Increase minimum complexity filter of the CloneChecker.

2017-07-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. We should probably add a test that shows that the current default value of MinimumCloneComplexity is large. Like, test that the positive we're trying to avoid with this patch is indeed gone. https://reviews.llvm.org/D34178 ___