frederic-tingaud-sonarsource added a comment.

It might also be interesting to think about cases that went through transitive 
assignment stripping when talking about the diagnostic position:
Before my patch, a dead store on variable `a` was displayed as follows:

  B b;
  A a = static_cast<A>(b = createB());
                           ^~~~~~~~~ 

(I'm switching back to C++ because I'm not sure exactly how legal such a thing 
would be in objective-C).
With the current fix, that doesn't change.
It might be clearer for the user to either put the diagnostic on the whole 
assignment or at least the whole initialization.


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

https://reviews.llvm.org/D126534

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

Reply via email to