Page MenuHomePhabricator

kallehuttunen (Kalle Huttunen)
User

Projects

User does not belong to any projects.

User Details

User Since
Sep 22 2016, 10:30 PM (163 w, 4 d)

Recent Activity

Mar 28 2019

kallehuttunen abandoned D59103: [clang-tidy] New checker bugprone-incomplete-comparison-operator.
Mar 28 2019, 8:10 AM · Restricted Project, Restricted Project
kallehuttunen added a comment to D59103: [clang-tidy] New checker bugprone-incomplete-comparison-operator.

Another idea that came to my mind would be to enable this check only for annotated types. So warning for missing field access would be only given for types that have for example [[clang::annotate("value type")]] annotation. Possibly other kinds of checks could be also developed for types that have the given annotation.

I don't think annotate would be a good choice because the primary purpose of that one is to pass that attribute information down to the backend and using it for this purpose feels a bit hackish. However, we could always add a new attribute if needed, but I'm not convinced an attribute is the right approach either (but then again, I'm also lacking information I'm sure).

What other kinds of checks do you have in mind and what are the semantics of the attribute you're thinking of?

Mar 28 2019, 8:09 AM · Restricted Project, Restricted Project

Mar 8 2019

kallehuttunen added a comment to D59103: [clang-tidy] New checker bugprone-incomplete-comparison-operator.

Another idea that came to my mind would be to enable this check only for annotated types. So warning for missing field access would be only given for types that have for example [[clang::annotate("value type")]] annotation. Possibly other kinds of checks could be also developed for types that have the given annotation.

Mar 8 2019, 7:17 AM · Restricted Project, Restricted Project
kallehuttunen added a comment to D59103: [clang-tidy] New checker bugprone-incomplete-comparison-operator.

I found this checker to be useful in the code base I initially developed it for, but the usage of comparison operators there is pretty much limited to comparing simple aggregate types. It's true that this checker can produce lots of false positives, maybe too much to be included to clang-tidy proper.

Mar 8 2019, 6:30 AM · Restricted Project, Restricted Project

Mar 7 2019

kallehuttunen added a comment to D59103: [clang-tidy] New checker bugprone-incomplete-comparison-operator.

Thank you for working on this!

This looks questionable to me.
Is this based on some coding standard?
Are there any numbers on the false-positive rate of theck?

Mar 7 2019, 11:01 AM · Restricted Project, Restricted Project
kallehuttunen added a comment to D59103: [clang-tidy] New checker bugprone-incomplete-comparison-operator.

The checker gives quite many warnings on LLVM code base. For example, running it for lib/Transforms/Scalar:

Mar 7 2019, 10:56 AM · Restricted Project, Restricted Project
kallehuttunen created D59103: [clang-tidy] New checker bugprone-incomplete-comparison-operator.
Mar 7 2019, 10:46 AM · Restricted Project, Restricted Project

Sep 22 2016

kallehuttunen updated subscribers of D24848: [clang-tidy] fix false-positive for cppcoreguidelines-pro-type-member-init with in-class initializers.
Sep 22 2016, 10:31 PM