[PATCH] D54563: [analyzer] MoveChecker Pt.4: Add a few more state reset methods.
Szelethus added a comment. Can you add tests for that just in case? :) Comment at: test/Analysis/use-after-move.cpp:331 for (int i = 0; i < bignum(); i++) { // expected-note {{Loop condition is true. Entering loop body}} expected-note {{Loop condition is true. Entering loop body}} constCopyOrMoveCall(std::move(a)); // expected-warning {{Moved-from object is moved 'a'}} expected-note {{Moved-from object is moved 'a'}} // expected-note@-1 {{'a' is moved}} >Because `list2` is passed by non-const reference (eg., rvalue reference) into >an unknown function, it will be invalidated when the call is modeled >conservatively, and therefore we will stop tracking it in the >`checkRegionChanges` callback. Hmmm. Doesn't this check something similar, but still cause an warning? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54563/new/ https://reviews.llvm.org/D54563 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D54563: [analyzer] MoveChecker Pt.4: Add a few more state reset methods.
Szelethus added a comment. Okay, I submit! :D Comment at: test/Analysis/use-after-move.cpp:260-262 for (int i = 0; i < bignum(); i++) { // expected-note {{Loop condition is false. Execution jumps to the end of the function}} rightRefCall(std::move(a));// no-warning } NoQ wrote: > This would have been the test for our case, but in this test the function has > a body and will not be evaluated conservatively. Hmm, since those are all STL containers, we should be able to have their definition? Or only with `c++-container-inlining=true`? Take this as more of a question than anything else. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54563/new/ https://reviews.llvm.org/D54563 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D55135: [CTU][Analyzer]Add DisplayCTUProgress analyzer switch
Szelethus added inline comments. Comment at: test/Analysis/ctu-main.cpp:6 // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config experimental-enable-naive-ctu-analysis=true -analyzer-config ctu-dir=%T/ctudir -verify %s +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config experimental-enable-naive-ctu-analysis=true -analyzer-config ctu-dir=%T/ctudir -analyzer-display-ctu-progress 2>&1 %s | FileCheck %s + martong wrote: > martong wrote: > > Szelethus wrote: > > > I think these RUN lines would really benefit from introducing line breaks. > > Yes, I agree. Unfortunately, I could not figure out how to break them. > > Using a simple "\" at around the 80th column gives `Test has unterminated > > run lines (with '\')`. If I use block comments with "\" the same happens. > > If I use block comments and don't use the "\" then the second line is not > > interpreted. Is it really possible to break RUN lines? I could not find > > anything about that in the online docs. > Oh, I just have found your other comment to the other patch. So yes, it is > indeed possible to break this line. I updated the patch accordingly. The > other long lines which are already there I am going to change in an > independent patch: (https://reviews.llvm.org/D55129). Is there any particular reason why we use `%clang_cc1 -analyze` as opposed to `%clang_analyze_cc1`? If not, lets change it. By the way, thanks! This looks neat. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55135/new/ https://reviews.llvm.org/D55135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits