summaryrefslogtreecommitdiffstats
path: root/docs/UsersManual.rst
diff options
context:
space:
mode:
authorGeorge Burgess IV <george.burgess.iv@gmail.com>2016-06-21 02:19:43 +0000
committerGeorge Burgess IV <george.burgess.iv@gmail.com>2016-06-21 02:19:43 +0000
commit7d29e48887df01ee66459726d979b7322d38bfcd (patch)
tree2e7a849686cad7cbbe9b3af3524fb2370bf01987 /docs/UsersManual.rst
parentd6c78f11de25dcaf4fb26e5e45be481db7f70741 (diff)
[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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273232 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/UsersManual.rst')
-rw-r--r--docs/UsersManual.rst19
1 files changed, 12 insertions, 7 deletions
diff --git a/docs/UsersManual.rst b/docs/UsersManual.rst
index 64ae4661d2..945dc53c4e 100644
--- a/docs/UsersManual.rst
+++ b/docs/UsersManual.rst
@@ -711,16 +711,19 @@ also allows you to push and pop the current warning state. This is
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