[PATCH] D74877: [clang] fewer incorrect Wdocumentation fix-its

Alexander Lanin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 19 15:24:09 PST 2020


AlexanderLanin created this revision.
AlexanderLanin added a reviewer: Mordante.
Herald added subscribers: llvm-commits, dexonsmith.
Herald added a project: LLVM.

Wdocumentation should not provide fix-its which map multiple documentations to the same parameter.
For the special case of one parameter and multiple potential documentations the best match should be chosen.

Functional changes are 'setDuplicatesToNullptr' and hardcoded change to first param is now only in case there is exactly one documentation to be matched.

This commit fixes:

- https://bugs.llvm.org/show_bug.cgi?id=43755
- https://bugs.llvm.org/show_bug.cgi?id=43808

---

I'm fully expecting some review iterations on this. Sorry about that.


https://reviews.llvm.org/D74877

Files:
  clang/include/clang/AST/CommentSema.h
  clang/lib/AST/CommentSema.cpp
  clang/test/Sema/warn-documentation-fixits.cpp
  llvm/unittests/ADT/StringRefTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74877.245542.patch
Type: text/x-patch
Size: 19353 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200219/82fd6b45/attachment.bin>


More information about the llvm-commits mailing list