NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.

Great, thanks!



================
Comment at: clang/test/Analysis/smart-ptr.cpp:472-474
+  // We are testing the fact that in our modelling of
+  // operator<<(basic_ostream<T1> &, const unique_ptr<T2> &)
+  // we set the return SVal to the SVal of the ostream arg.
----------------
Another thing to test could be that global variables are not invalidated. Eg.:

```lang=c++
int glob;
void foo(std::unique_ptr<int> P) {
  int x = glob;
  std::cout << P;
  int y = glob;
  clang_analyzer_eval(x == y); // expected-warning{{TRUE}}
}


================
Comment at: clang/test/Analysis/smart-ptr.cpp:476
+  clang_analyzer_eval(&Cout == &PtrCout);    // expected-warning {{TRUE}}
+  clang_analyzer_eval(&Cout == &StringCout); // expected-warning {{UNKNOWN}}
+}
----------------
This deserves a `FIXME:` because the expected result is still `TRUE`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105421/new/

https://reviews.llvm.org/D105421

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to