r273232 - [Docs] More warning fixes to unbreak the docs buildbot.

George Burgess IV via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 20 19:19:44 PDT 2016


Author: gbiv
Date: Mon Jun 20 21:19:43 2016
New Revision: 273232

URL: http://llvm.org/viewvc/llvm-project?rev=273232&view=rev
Log:
[Docs] More warning fixes to unbreak the docs buildbot.

A number of warnings still remain, but these were the last of the
"unlexable code"-related ones (AFAICT).

I changed a few examples in docs/UsersManual.rst to showcase
-Wextra-tokens because it's already documented (-Wmultichar isn't), and
the sphinx C lexer apparently can't handle char literals like 'ab'. It
seemed like a better overall approach than just marking the code blocks
as none or console.

Modified:
    cfe/trunk/docs/SourceBasedCodeCoverage.rst
    cfe/trunk/docs/ThreadSanitizer.rst
    cfe/trunk/docs/UsersManual.rst

Modified: cfe/trunk/docs/SourceBasedCodeCoverage.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/SourceBasedCodeCoverage.rst?rev=273232&r1=273231&r2=273232&view=diff
==============================================================================
--- cfe/trunk/docs/SourceBasedCodeCoverage.rst (original)
+++ cfe/trunk/docs/SourceBasedCodeCoverage.rst Mon Jun 20 21:19:43 2016
@@ -123,7 +123,7 @@ distinct views for ``foo<int>(...)`` and
 ``-show-line-counts-or-regions`` is enabled, ``llvm-cov`` displays sub-line
 region counts (even in macro expansions):
 
-.. code-block:: cpp
+.. code-block:: none
 
        20|    1|#define BAR(x) ((x) || (x))
                                ^20     ^2

Modified: cfe/trunk/docs/ThreadSanitizer.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/ThreadSanitizer.rst?rev=273232&r1=273231&r2=273232&view=diff
==============================================================================
--- cfe/trunk/docs/ThreadSanitizer.rst (original)
+++ cfe/trunk/docs/ThreadSanitizer.rst Mon Jun 20 21:19:43 2016
@@ -30,7 +30,7 @@ and line numbers in the warning messages
 
 Example:
 
-.. code-block:: c++
+.. code-block:: console
 
   % cat projects/compiler-rt/lib/tsan/lit_tests/tiny_race.c
   #include <pthread.h>

Modified: cfe/trunk/docs/UsersManual.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/UsersManual.rst?rev=273232&r1=273231&r2=273232&view=diff
==============================================================================
--- cfe/trunk/docs/UsersManual.rst (original)
+++ cfe/trunk/docs/UsersManual.rst Mon Jun 20 21:19:43 2016
@@ -711,16 +711,19 @@ also allows you to push and pop the curr
 particularly useful when writing a header file that will be compiled by
 other people, because you don't know what warning flags they build with.
 
-In the below example :option:`-Wmultichar` is ignored for only a single line of
-code, after which the diagnostics return to whatever state had previously
+In the below example :option:`-Wextra-tokens` is ignored for only a single line
+of code, after which the diagnostics return to whatever state had previously
 existed.
 
 .. code-block:: c
 
-  #pragma clang diagnostic push
-  #pragma clang diagnostic ignored "-Wmultichar"
+  #if foo
+  #endif foo // warning: extra tokens at end of #endif directive
 
-  char b = 'df'; // no warning.
+  #pragma clang diagnostic ignored "-Wextra-tokens"
+
+  #if foo
+  #endif foo // no warning
 
   #pragma clang diagnostic pop
 
@@ -772,11 +775,13 @@ the pragma onwards within the same file.
 
 .. code-block:: c
 
-  char a = 'xy'; // warning
+  #if foo
+  #endif foo // warning: extra tokens at end of #endif directive
 
   #pragma clang system_header
 
-  char b = 'ab'; // no warning
+  #if foo
+  #endif foo // no warning
 
 The :option:`--system-header-prefix=` and :option:`--no-system-header-prefix=`
 command-line arguments can be used to override whether subsets of an include




More information about the cfe-commits mailing list