aaron.ballman added inline comments.
================ Comment at: clang-tidy/bugprone/UnusedReturnValueCheck.cpp:68 + diag(Matched->getLocStart(), + "the value returned by %0 should normally be used") + << dyn_cast_or_null<NamedDecl>(Matched->getCalleeDecl()) ---------------- "Normally" is probably a bad term to use here. How about "the value returned by %0 is usually not intended to be discarded"? ================ Comment at: clang-tidy/bugprone/UnusedReturnValueCheck.cpp:69 + "the value returned by %0 should normally be used") + << dyn_cast_or_null<NamedDecl>(Matched->getCalleeDecl()) + << Matched->getSourceRange(); ---------------- In the event this returns null, the diagnostic is going to look rather odd. Because the value of the call expression is unused, this will most often trigger in a context where the method call can be inferred (especially because you're now highlighting the source range). It might make sense to simply replace the %0 with "this call expression" or somesuch in the diagnostic. https://reviews.llvm.org/D41655 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits