LegalizeAdulthood added inline comments.

================
Comment at: clang-tidy/readability/RedundantReturnCheck.cpp:46-49
@@ +45,6 @@
+      auto ReturnRange = CharSourceRange::getCharRange(
+          Start, Lexer::findLocationAfterToken(
+                     Return->getLocEnd(), tok::semi, *Result.SourceManager,
+                     Result.Context->getLangOpts(),
+                     /*SkipTrailingWhitespaceAndNewLine=*/true));
+
----------------
This was a great trick I stole from the unused namespace alias check.  I could 
really use some method for trimming off preceding whitespace for a statement as 
well.  Right now, the `return` statement gets removed, but when it appears on a 
line by itself, it's indentation whitespace is left in place and I'd like to be 
able to remove that as well.  I tried a couple things, but for this first pass 
simply decided to let the test cases allow leading whitespace before the 
closing brace of the function.  One can always use artistic style or 
`clang-format` to reformat the results anyway, so it's not that big a deal I 
suppose.


http://reviews.llvm.org/D16259



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to