[PATCH] D82162: [clang-tidy] RenamerClangTidy wont emit fixes in scratch space

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 21 11:07:54 PDT 2020


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


================
Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-identifier-naming.cpp:570
+
+// We don't want a warning here as the call to this in Foo is in a scratch
+// buffer so its fix-it wouldn't be applied, resulting in invalid code.
----------------
aaron.ballman wrote:
> I may be misunderstanding the comment here. I can understand not wanting to generate fixits into the scratch buffer (that would not do good things), but I think we still want a warning were it not for the macro, right? Just verifying that this is not changing warning behaviors, only fix-it behaviors.
You're absolutely right, however right now this fix just marks it as being `InsideMacro`. The reason diagnostics aren't emitted is becuase somewhere in this checks life someone decided to not emit warnings for declarations with usages inside macros. If that behaviour is to be changed a separate patch would be required.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82162





More information about the cfe-commits mailing list