Prevent fixes being displayed if usages are found in the scratch buffer.
See Fix-It hints are being generated in the ScratchBuffer.
It may be wise down the line to put in a general fix in clang-tidy to prevent ScratchBuffer replacements being applied, but for now this will help.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/test/clang-tidy/checkers/readability-identifier-naming.cpp | ||
---|---|---|
570 | 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. |
clang-tools-extra/test/clang-tidy/checkers/readability-identifier-naming.cpp | ||
---|---|---|
570 | 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. |
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.