aboutsummaryrefslogtreecommitdiff
path: root/clang/docs
diff options
context:
space:
mode:
authorCorentin Jabot <corentinjabot@gmail.com>2022-06-17 16:23:41 +0200
committerCorentin Jabot <corentinjabot@gmail.com>2022-07-06 17:59:44 +0200
commite3dc56805f1029dd5959e4c69196a287961afb8d (patch)
treed86d5a7c8e9a59d301b4faec0f1bc495f81c2166 /clang/docs
parent95e08824faba43a4fa052b9366dcea19e2268541 (diff)
downloadllvm-e3dc56805f1029dd5959e4c69196a287961afb8d.zip
llvm-e3dc56805f1029dd5959e4c69196a287961afb8d.tar.gz
llvm-e3dc56805f1029dd5959e4c69196a287961afb8d.tar.bz2
[Clang] Add a warning on invalid UTF-8 in comments.
Introduce an off-by default `-Winvalid-utf8` warning that detects invalid UTF-8 code units sequences in comments. Invalid UTF-8 in other places is already diagnosed, as that cannot appear in identifiers and other grammar constructs. The warning is off by default as its likely to be somewhat disruptive otherwise. This warning allows clang to conform to the yet-to be approved WG21 "P2295R5 Support for UTF-8 as a portable source file encoding" paper. Reviewed By: aaron.ballman, #clang-language-wg Differential Revision: https://reviews.llvm.org/D128059
Diffstat (limited to 'clang/docs')
-rw-r--r--clang/docs/ReleaseNotes.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 0f542e0..c50e1b8 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -279,6 +279,8 @@ Improvements to Clang's diagnostics
unevaluated operands of a ``typeid`` expression, as they are now
modeled correctly in the CFG. This fixes
`Issue 21668 <https://github.com/llvm/llvm-project/issues/21668>`_.
+- Added ``-Winvalid-utf8`` which diagnoses invalid UTF-8 code unit sequences in
+ comments.
Non-comprehensive list of changes in this release
-------------------------------------------------
@@ -576,7 +578,7 @@ AST Matchers
- Added ``forEachTemplateArgument`` matcher which creates a match every
time a ``templateArgument`` matches the matcher supplied to it.
-
+
- Added ``objcStringLiteral`` matcher which matches ObjectiveC String
literal expressions.