[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 30 06:47:42 PDT 2021
martong added inline comments.
================
Comment at: clang/test/Analysis/inner-pointer.cpp:23
+
+char *data(std::string &c);
+
----------------
Seems like all test are exercising with std::string, this looks like a legacy in this Checker.
Still, I miss a bit at least one test for the other overloads of `std::data`, maybe in a follow up patch?
================
Comment at: clang/test/Analysis/inner-pointer.cpp:378-392
+void func_addressof() {
+ const char *c;
+ std::string s;
+ c = s.c_str();
+ addressof(s);
+ consume(c); // no-warning
+}
----------------
So these are the FP cases that you are trying to solve?
Would be nice to see more details about the bug report (rdar://73463300) if that is not proprietary.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99260/new/
https://reviews.llvm.org/D99260
More information about the cfe-commits
mailing list