[PATCH] D114197: [clang-tidy] Fix false positives involving type aliases in `misc-unconventional-assign-operator` check

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 8 08:36:58 PST 2021


aaron.ballman accepted this revision.
aaron.ballman added a comment.

LGTM aside from some small nits.



================
Comment at: clang-tools-extra/docs/clang-tidy/checks/misc-unconventional-assign-operator.rst:12
+  * The assignment may be from the class type by value, const lvalue
+    reference, or non-const rvalue reference, or from a completely different
+    type (e.g. ``int``).
----------------



================
Comment at: clang-tools-extra/test/clang-tidy/checkers/misc-unconventional-assign-operator.cpp:131
+
+// Check that no false positives are issued when using type aliases
+struct TypeAlias {
----------------
Can you also add tests which use `typedef` instead of `using`? (They should just work as-is)


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

https://reviews.llvm.org/D114197



More information about the cfe-commits mailing list