khuttun marked an inline comment as done.
khuttun added inline comments.

================
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();
----------------
aaron.ballman wrote:
> 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.
I can remove the function name from the diagnostic. Out of curiosity, in which 
situations could it be null?


https://reviews.llvm.org/D41655



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

Reply via email to