[clang-tools-extra] r279659 - Clang-tidy documentation style. Two Google checks are aliases.
Eugene Zelenko via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 24 13:05:36 PDT 2016
Author: eugenezelenko
Date: Wed Aug 24 15:05:36 2016
New Revision: 279659
URL: http://llvm.org/viewvc/llvm-project?rev=279659&view=rev
Log:
Clang-tidy documentation style. Two Google checks are aliases.
Differential revision: https://reviews.llvm.org/D23815
Modified:
clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-namespace-comments.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-redundant-smartptr-get.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/llvm-namespace-comment.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/misc-definitions-in-headers.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/misc-string-constructor.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/readability-redundant-control-flow.rst
clang-tools-extra/trunk/docs/clang-tidy/checks/readability-redundant-smartptr-get.rst
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-namespace-comments.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-namespace-comments.rst?rev=279659&r1=279658&r2=279659&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-namespace-comments.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-namespace-comments.rst Wed Aug 24 15:05:36 2016
@@ -1,11 +1,9 @@
.. title:: clang-tidy - google-readability-namespace-comments
+.. meta::
+ :http-equiv=refresh: 5;URL=llvm-namespace-comment.html
google-readability-namespace-comments
=====================================
-
-Checks that long namespaces have a closing comment.
-
-http://llvm.org/docs/CodingStandards.html#namespace-indentation
-
-https://google.github.io/styleguide/cppguide.html#Namespaces
+The google-readability-namespace-comments check is an alias, please see
+`llvm-namespace-comment <llvm-namespace-comment.html>`_ for more information.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-redundant-smartptr-get.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-redundant-smartptr-get.rst?rev=279659&r1=279658&r2=279659&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-redundant-smartptr-get.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/google-readability-redundant-smartptr-get.rst Wed Aug 24 15:05:36 2016
@@ -1,16 +1,10 @@
.. title:: clang-tidy - google-readability-redundant-smartptr-get
+.. meta::
+ :http-equiv=refresh: 5;URL=readability-redundant-smartptr-get.html
google-readability-redundant-smartptr-get
=========================================
-
-Find and remove redundant calls to smart pointer's ``.get()`` method.
-
-Examples:
-
-.. code:: c++
-
- ptr.get()->Foo() ==> ptr->Foo()
- *ptr.get() ==> *ptr
- *ptr->get() ==> **ptr
-
+The google-readability-redundant-smartptr-get check is an alias, please see
+`readability-redundant-smartptr-get <readability-redundant-smartptr-get.html>`_
+for more information.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst?rev=279659&r1=279658&r2=279659&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/list.rst Wed Aug 24 15:05:36 2016
@@ -40,8 +40,8 @@ Clang-Tidy Checks
google-readability-braces-around-statements (redirects to readability-braces-around-statements) <google-readability-braces-around-statements>
google-readability-casting
google-readability-function-size (redirects to readability-function-size) <google-readability-function-size>
- google-readability-namespace-comments
- google-readability-redundant-smartptr-get
+ google-readability-namespace-comments (redirects to llvm-namespace-comment) <google-readability-namespace-comments>
+ google-readability-redundant-smartptr-get (redirects to readability-redundant-smartptr-get) <google-readability-redundant-smartptr-get>
google-readability-todo
google-runtime-int
google-runtime-member-string-references
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/llvm-namespace-comment.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/llvm-namespace-comment.rst?rev=279659&r1=279658&r2=279659&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/llvm-namespace-comment.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/llvm-namespace-comment.rst Wed Aug 24 15:05:36 2016
@@ -3,6 +3,8 @@
llvm-namespace-comment
======================
+`google-readability-namespace-comments` redirects here as an alias for this
+check.
Checks that long namespaces have a closing comment.
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/misc-definitions-in-headers.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/misc-definitions-in-headers.rst?rev=279659&r1=279658&r2=279659&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/misc-definitions-in-headers.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/misc-definitions-in-headers.rst Wed Aug 24 15:05:36 2016
@@ -7,7 +7,7 @@ Finds non-extern non-inline function and
which can lead to potential ODR violations in case these headers are included
from multiple translation units.
-.. code:: c++
+.. code-block:: c++
// Foo.h
int a = 1; // Warning: variable definition.
@@ -38,9 +38,10 @@ from multiple translation units.
}
class A {
- public:
+ public:
int f1() { return 1; } // OK: implicitly inline member function definition is allowed.
int f2();
+
static int d;
};
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/misc-string-constructor.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/misc-string-constructor.rst?rev=279659&r1=279658&r2=279659&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/misc-string-constructor.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/misc-string-constructor.rst Wed Aug 24 15:05:36 2016
@@ -9,27 +9,24 @@ A common mistake is to swap parameters t
Examples:
-.. code:: c++
+.. code-block:: c++
std::string('x', 50) str; // should be std::string(50, 'x')
-
Calling the string-literal constructor with a length bigger than the literal is
suspicious and adds extra random characters to the string.
Examples:
-.. code:: c++
+.. code-block:: c++
std::string("test", 200); // Will include random characters after "test".
-
Creating an empty string from constructors with parameters is considered
suspicious. The programmer should use the empty constructor instead.
Examples:
-.. code:: c++
+.. code-block:: c++
std::string("test", 0); // Creation of an empty string.
-
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/readability-redundant-control-flow.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/readability-redundant-control-flow.rst?rev=279659&r1=279658&r2=279659&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/readability-redundant-control-flow.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/readability-redundant-control-flow.rst Wed Aug 24 15:05:36 2016
@@ -4,17 +4,16 @@ readability-redundant-control-flow
==================================
This check looks for procedures (functions returning no value) with ``return``
-statements at the end of the function. Such ``return`` statements are
-redundant.
+statements at the end of the function. Such ``return`` statements are redundant.
Loop statements (``for``, ``while``, ``do while``) are checked for redundant
``continue`` statements at the end of the loop body.
Examples:
-The following function `f` contains a redundant `return` statement:
+The following function `f` contains a redundant ``return`` statement:
-.. code:: c++
+.. code-block:: c++
extern void g();
void f() {
@@ -24,16 +23,16 @@ The following function `f` contains a re
becomes
-.. code:: c++
+.. code-block:: c++
extern void g();
void f() {
g();
}
-The following function `k` contains a redundant `continue` statement:
+The following function `k` contains a redundant ``continue`` statement:
-.. code:: c++
+.. code-block:: c++
void k() {
for (int i = 0; i < 10; ++i) {
@@ -43,7 +42,7 @@ The following function `k` contains a re
becomes
-.. code:: c++
+.. code-block:: c++
void k() {
for (int i = 0; i < 10; ++i) {
Modified: clang-tools-extra/trunk/docs/clang-tidy/checks/readability-redundant-smartptr-get.rst
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/docs/clang-tidy/checks/readability-redundant-smartptr-get.rst?rev=279659&r1=279658&r2=279659&view=diff
==============================================================================
--- clang-tools-extra/trunk/docs/clang-tidy/checks/readability-redundant-smartptr-get.rst (original)
+++ clang-tools-extra/trunk/docs/clang-tidy/checks/readability-redundant-smartptr-get.rst Wed Aug 24 15:05:36 2016
@@ -3,12 +3,14 @@
readability-redundant-smartptr-get
==================================
+`google-readability-redundant-smartptr-get` redirects here as an alias for this
+check.
Find and remove redundant calls to smart pointer's ``.get()`` method.
Examples:
-.. code:: c++
+.. code-block:: c++
ptr.get()->Foo() ==> ptr->Foo()
*ptr.get() ==> *ptr
More information about the cfe-commits
mailing list