njames93 added a comment. In D83717#2152762 <https://reviews.llvm.org/D83717#2152762>, @gamesh411 wrote:
> In D83717#2150977 <https://reviews.llvm.org/D83717#2150977>, @njames93 wrote: > > > Alternatively you could do something like this, though it would be a pain > > https://github.com/llvm/llvm-project/blob/master/clang-tools-extra/test/clang-tidy/checkers/bugprone-argument-comment-gmock.cpp#L86 > > > I have bitten the bullet, and have gone down this route. With relative > numbering, the sections themselves are at least translation-invariant. Not > the prettiest sight, tho. > Thanks! I almost think it would be nice FileCheck supported some directive like: // LINE-NAME: <LINENAME> And corresponding check lines: [[<LINENAME>]] [[<LINENAME>+N]] [[<LINENAME>-N]] Would result in the ability to write checks like this: void longjmp_handler() {// LINE-NAME: LONGJMP longjmp(env, 255); } ... void foo(){ atexit(longjmp_handler); // CHECK-NOTES: :[[@LINE-1]]:3: warning: exit-handler potentially calls a jump function. Handlers should terminate by returning [cert-env32-c] // CHECK-NOTES: :[[LONGJMP]]:1: note: handler function declared here // CHECK-NOTES: :[[LONGJMP+1]]:3: note: jump function called here } Anyway that's a story for another day. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83717/new/ https://reviews.llvm.org/D83717 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits