[PATCH] D25406: Fix doubled whitespace in modernize-use-auto fixit
Malcolm Parsons via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 10 08:31:03 PDT 2016
malcolm.parsons added inline comments.
================
Comment at: clang-tidy/modernize/UseAutoCheck.cpp:378
+ Lexer::getLocForEndOfToken(Range.getEnd(), 0, SM, Context->getLangOpts());
+ bool Whitespace = isWhitespace(*FullSourceLoc(Next, SM).getCharacterData());
+
----------------
aaron.ballman wrote:
> Oye, this is deceptively expensive because you now have to go back to the actual source file for this information. That source file may live on a network share somewhere, for instance.
>
> Can you use `Token::hasLeadingSpace()` instead?
>
> Also, doesn't this still need to care about the `RemoveStars` option?
Where would I get a Token from?
https://reviews.llvm.org/D25406
More information about the cfe-commits
mailing list