[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

Takuya Shimizu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 13 05:08:14 PDT 2023


hazohelet added inline comments.


================
Comment at: clang/lib/Sema/Sema.cpp:1350
           continue; // Deleted functions are supposed to be unused.
+        SourceRange DiagRange = SourceRange(DiagD->getLocation());
+        if (const ASTTemplateArgumentListInfo *ASTTAL =
----------------
aaron.ballman wrote:
> Does `DiagD->getSourceRange()` not give you the same results?
`FunctionDecl::getSourceRange` also covers the return type and the function body if it exists, so we cannot use it here.


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

https://reviews.llvm.org/D152707



More information about the cfe-commits mailing list