[clang-tools-extra] r324233 - [clang-tidy] tweak "misc-definitions-in-headers" doc, NFC.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 5 05:04:41 PST 2018


Author: hokein
Date: Mon Feb  5 05:04:41 2018
New Revision: 324233

URL: http://llvm.org/viewvc/llvm-project?rev=324233&view=rev
Log:
[clang-tidy] tweak "misc-definitions-in-headers" doc, NFC.

Modified:
    clang-tools-extra/trunk/docs/clang-tidy/checks/misc-definitions-in-headers.rst

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=324233&r1=324232&r2=324233&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 Mon Feb  5 05:04:41 2018
@@ -26,6 +26,7 @@ from multiple translation units.
    static int b = 1;
    const int c = 1;
    const char* const str2 = "foo";
+   constexpr int k = 1;
 
    // Warning: function definition.
    int g() {
@@ -80,9 +81,7 @@ from multiple translation units.
 
    inline int i = 5; // OK: inline variable definition.
 
-   constexpr int k = 1; // OK: constexpr variable has internal linkage.
-
-   constexpr int f10() { return 0; } // OK: constexpr function definition.
+   constexpr int f10() { return 0; } // OK: constexpr function implies inline.
 
 Options
 -------




More information about the cfe-commits mailing list