[PATCH] D25316: [clang-tidy] Fix PR25499: Enhance modernize-use-auto to casts
Malcolm Parsons via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 7 02:24:10 PDT 2016
malcolm.parsons added a comment.
In https://reviews.llvm.org/D25316#563930, @Prazek wrote:
> Please add tests with
>
> long long p = static_cast<long long>(4);
>
>
> and the same with const at beginning. I remember I had problems with this last time (Type->SourceRange was returning only source range for the first token.
BuiltinTypeLoc only returns the first token:
SourceRange getLocalSourceRange() const {
return SourceRange(getBuiltinLoc(), getBuiltinLoc());
}
The existing check fails too:
-long long *ll = new long long();
+auto long *ll = new long long();
https://reviews.llvm.org/D25316
More information about the cfe-commits
mailing list