logan-5 added a comment. In D82728#2161152 <https://reviews.llvm.org/D82728#2161152>, @xbolva00 wrote:
> Is it possible to emit fixit note with "override" ? This is a good idea, though unfortunately (after eyeballing the implementation of `modernize-use-override` in clang-tidy (UseOverrideCheck.cpp)), it looks non-trivial to figure out where exactly to insert `override`. There's some significant logic in the clang-tidy check involving re-lexing the relevant tokens, to find the insertion point in the presence of complexity like inline definitions, `= 0`, `= {delete|default}`, function try blocks, macros, and the list goes on. The clang-tidy check has this FIXME comment to address the complexity (UseOverrideCheck.cpp:136): // FIXME: Instead of re-lexing and looking for specific macros such as // 'ABSTRACT', properly store the location of 'virtual' and '= 0' in each // FunctionDecl. If this was done, the resulting information would presumably simplify the clang-tidy check as well as make it easier to add a fixit to this warning. This sounds like an interesting problem, but also like a sizable refactor, and I won't be upset if someone beats me to it. :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82728/new/ https://reviews.llvm.org/D82728 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits