Szelethus added a comment.

> [...]lambda misuse in not really an uninitialized value problem.

I guess you can make the argument that it its. Even then, in my opinion this 
checker is overkill for lambdas.

- If the captured variable has a non-default constructor, 
`UninitializedValueChecker` will analyze it,
- if the captured variable has a default constructor, or if `Pedantic` is 
disabled and all fields are uninitialized, we probably don't want to warn for 
them anyways,
- if the captured variable is primitive (`BuiltinType` or `EnumeralType`) we 
can just easily iterate over the captured fields to check whether they are 
undefined, and make a decision whether to warn for them or not.

My point is, a standalone `cplusplus.LambdaMisuse` checker would be a lot more 
fitting to handle these cases.

But I'd love to hear your thoughts on this one! This functionality could 
totally be squeezed into the checker (with better warning messages), if we were 
to come to the conclusion that it should be.


Repository:
  rC Clang

https://reviews.llvm.org/D48318



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

Reply via email to