[PATCH] D22048: [analyzer] Suppress false positives in std::shared_ptr
Devin Coughlin via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 6 13:35:16 PDT 2016
dcoughlin added inline comments.
================
Comment at: test/Analysis/Inputs/system-header-simulator-cxx.h:349
@@ +348,3 @@
+ // No warning is expected as we are suppressing warning coming
+ // out of std::basic_string.
+ int z = 0;
----------------
NoQ wrote:
> You mean std::shared_ptr here?
>
> Also, perhaps it's better to move this example into separate fake method; if this header emulator is used in another test, wouldn't the author of that test be surprised to see that operator=() is modeled that way?
Yes, this is copy pasta!
================
Comment at: test/Analysis/Inputs/system-header-simulator-cxx.h:349
@@ +348,3 @@
+ // No warning is expected as we are suppressing warning coming
+ // out of std::basic_string.
+ int z = 0;
----------------
dcoughlin wrote:
> NoQ wrote:
> > You mean std::shared_ptr here?
> >
> > Also, perhaps it's better to move this example into separate fake method; if this header emulator is used in another test, wouldn't the author of that test be surprised to see that operator=() is modeled that way?
> Yes, this is copy pasta!
> Also, perhaps it's better to move this example into separate fake method; if this header emulator is used in another test, wouldn't the author of that test be surprised to see that operator=() is modeled that way?
We don't really model much in this this fake header, but I could move all the truly gross suppression stuff (basic string, _independent_bits_engine, shared_ptr) into a separate header and name it something that clearly indicates other tests shouldn't use it.
I'll update the patch.
http://reviews.llvm.org/D22048
More information about the cfe-commits
mailing list