[clang-tools-extra] r319785 - [clang-tidy] adjust cppcoreguidelines-owning-memory documentation

Jonas Toth via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 5 08:37:49 PST 2017


Author: jonastoth
Date: Tue Dec  5 08:37:49 2017
New Revision: 319785

URL: http://llvm.org/viewvc/llvm-project?rev=319785&view=rev
Log:
[clang-tidy] adjust cppcoreguidelines-owning-memory documentation

Summary:
A user of the check opened a bugreport and reported that `std::exchange`
triggers a false positive. I adjusted the doc to include a list of known
(std) constructs that do trigger the issue with templates forgetting the
type alias.

Reviewers: aaron.ballman, alexfh, hokein

Reviewed By: aaron.ballman

Subscribers: klimek, nemanjai, xazax.hun, kbarton, cfe-commits

Differential Revision: https://reviews.llvm.org/D40829

Modified:
    clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-owning-memory.rst

Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-owning-memory.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-owning-memory.rst?rev=319785&r1=319784&r2=319785&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-owning-memory.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/cppcoreguidelines-owning-memory.rst Tue Dec  5 08:37:49 2017
@@ -111,7 +111,11 @@ The ``gsl::owner<T*>`` is declared as a
 In template functions and classes, like in the example below, the information
 of the type aliases gets lost. Therefore using ``gsl::owner<T*>`` in a heavy templated
 code base might lead to false positives. 
-This limitation results in ``std::vector<gsl::owner<T*>>`` not being diagnosed correctly.
+
+Known code constructs that do not get diagnosed correctly are:
+
+- ``std::exchange``
+- ``std::vector<gsl::owner<T*>>``
 
 .. code-block:: c++
 




More information about the cfe-commits mailing list