juliehockett added a comment.

We're going to go with fuchsia-* for the module name, since the style applies 
to the broader project. Also, there may be zircon-specific checks at some 
point, so we want to leave the door open for that.



================
Comment at: clang-tidy/fuchsia/DefaultArgumentsCheck.cpp:35-38
+    SourceRange RemovalRange(
+          Lexer::getLocForEndOfToken(D->getLocation(), 0, 
+                *Result.SourceManager, Result.Context->getLangOpts()),
+          D->getDefaultArgRange().getEnd()
----------------
aaron.ballman wrote:
> Does `getDefaultArgRange()` not provide the correct range already (so you 
> don't need to go back to the original source)? Or does that range miss the 
> `=`?
> 
> You might want to disable the fix-it in the case `getDefaultArgRange()` 
> returns an empty range, or in case the default arg expression comes from a 
> macro (and add a test for the latter case). e.g.,
> ```
> #define DERP(val)  = val
> 
> void f(int i DERP);
> ```
> Additionally, a test where the identifier is elided would be good as well: 
> `void f(int = 12);`
`getDefaultArgRange()` misses the `=` -- though if there's a better way to do 
it I'm all ears! 


https://reviews.llvm.org/D40108



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

Reply via email to