Febbe added a comment.

In D137205#3936944 <https://reviews.llvm.org/D137205#3936944>, @firewave wrote:

> The crash is gone.
>
> The false positive with the `[m]` capture is still present with `-std=c++11`.

Does only a warning appear? Or also a fix? Currently, only a warning should 
appear, but this is not fixable in c++11.

> Here's another false positive:
>
>   #include <string>
>   
>   void f(const std::string&);
>   
>   int main() {
>       std::string s;
>       f(s.empty() ? "<>" : s);
>   }
>
>
>
>   input.cpp:7:26: warning: Parameter 's' is copied on last use, consider 
> moving it instead. [performance-unnecessary-copy-on-last-use]
>       f(s.empty() ? "<>" : s);
>                            ^
>                            std::move( )

Thanks for the minimal examples. Need to look into the AST's.

> I still have another false positive with static variables but have not gotten 
> around reducing it yet.
>
> I posted the false negatives in the GitHub ticket as those do not relate to 
> getting this approved.

Also thanks, I've looked over them, seems like there is a problem with the 
detection in the CFG regarding self assignments.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137205

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

Reply via email to