aaron.ballman added a comment.

I think the cast to void is unneeded in these cases. We typically add a cast to 
void when the function exists to compute a result but also has side effects. 
e.g., you typically call `malloc()` because you want the returned pointer, but 
if for some reason you don't want the pointer but still want the side effect of 
the memory allocation, you'd cast the result of the call to `void`. In this 
case, the `Traverse` functions exist mostly to perform side effects and the 
return value is only used to indicate "should we keep going?". It's reasonable 
to ignore the return value in this case if you don't intend to stop the 
traversal (and in this particular case, nothing will return `false` from the 
traversal and so there's really no need to check the return values here).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156261/new/

https://reviews.llvm.org/D156261

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

Reply via email to