[PATCH] D125885: [clang-tidy] bugprone-argument-comment: Ignore calls to user-defined literals

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 18 12:45:22 PDT 2022


njames93 added a comment.

These tests aren't that great.
I'd advise adding a test that just checks using the userDefinedLiteral in `bugprone-argument-comment-literals.cpp`, That check file will add comments to parameters that don't have them.
That way you aren't testing against distinguishing between the actual parameter comment and the literal comment.
This simple edit without your fix results in this diff in the output, with your fix that diff wont exist.

  [build]  int operator""_op(unsigned long long Value);
  [build]  
  [build]  void test() {
  [build] -  1_op;
  [build] +  /*Value=*/1_op;


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125885



More information about the cfe-commits mailing list