Details
- Reviewers
alexfh sbenza - Commits
- rG06e323a6eeff: [clang-tidy] Add a checker that suggests replacing short/long/long long with…
rCTE216726: [clang-tidy] Add a checker that suggests replacing short/long/long long with…
rL216726: [clang-tidy] Add a checker that suggests replacing short/long/long long with…
Diff Detail
Event Timeline
clang-tidy/google/IntegerTypesCheck.cpp | ||
---|---|---|
85 | Why not static const StringRef? | |
95 | nit: I'd swap the other two sentences and put each starting from its own line: // We don't add a fix-it as changing the type can easily break code, // e.g. when a function requires a 'long' argument on all platforms. // QualTypes are printed with implicit quotes. | |
clang-tidy/google/IntegerTypesCheck.h | ||
21 | Maybe: ... with u?intXX(_t)? ? | |
26 | I'd use a bool flag instead of TypeSuffix or at least would add a comment describing the "_t" option for standard types. | |
31 | Mark these fields "const"? |
clang-tools-extra/trunk/clang-tidy/google/GoogleTidyModule.cpp | ||
---|---|---|
45 ↗ | (On Diff #13085) | The name should be more explicit. |
clang-tools-extra/trunk/clang-tidy/google/IntegerTypesCheck.cpp | ||
20 ↗ | (On Diff #13085) | Move this to ASTMatchers.h |
clang-tools-extra/trunk/test/clang-tidy/google-runtime-int.cpp | ||
4 ↗ | (On Diff #13085) | This will fail on some platforms, right? "long" is not 64 bits everywhere (which is the point of this clang-tidy check). |
clang-tidy/google/IntegerTypesCheck.cpp | ||
---|---|---|
86 | static const StringRef would save some strlen calls. Also, when I was asking about StringRef, I had a thought that it could help avoiding std::strncmp. I was wrong, so StringRef doesn't make things any better. My bad. But it was a question, not a request to change it. | |
97 | We should somehow hint the user, which header the new types are in. | |
clang-tidy/google/IntegerTypesCheck.h | ||
19 | It also finds unsigned versions of these, right? | |
26 | I think, it makes sense noting that we need "_t" for standard types defined in <stdint.h>. |
It also finds unsigned versions of these, right?