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
- Repository
- rL LLVM
Event Timeline
clang-tidy/google/IntegerTypesCheck.cpp | ||
---|---|---|
84 ↗ | (On Diff #13078) | Why not static const StringRef? |
94 ↗ | (On Diff #13078) | 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 | ||
20 ↗ | (On Diff #13078) | Maybe: ... with u?intXX(_t)? ? |
25 ↗ | (On Diff #13078) | I'd use a bool flag instead of TypeSuffix or at least would add a comment describing the "_t" option for standard types. |
30 ↗ | (On Diff #13078) | Mark these fields "const"? |
clang-tools-extra/trunk/clang-tidy/google/GoogleTidyModule.cpp | ||
---|---|---|
45 | The name should be more explicit. | |
clang-tools-extra/trunk/clang-tidy/google/IntegerTypesCheck.cpp | ||
20 | Move this to ASTMatchers.h | |
clang-tools-extra/trunk/test/clang-tidy/google-runtime-int.cpp | ||
4 | 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 ↗ | (On Diff #13082) | 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 ↗ | (On Diff #13082) | We should somehow hint the user, which header the new types are in. |
clang-tidy/google/IntegerTypesCheck.h | ||
19 ↗ | (On Diff #13082) | It also finds unsigned versions of these, right? |
26 ↗ | (On Diff #13082) | I think, it makes sense noting that we need "_t" for standard types defined in <stdint.h>. |
The name should be more explicit.