[PATCH] D93999: [clang] Fix message text for `-Wpointer-sign` to account for plain char

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 11 06:12:54 PST 2021


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM aside from some very minor nits.



================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:7784
+  " converts between pointers to integer types %select{with different sign|"
+  "where one is of the unique plain char type and the other is not}3">,
   InGroup<DiagGroup<"pointer-sign">>;
----------------



================
Comment at: clang/lib/Sema/SemaExpr.cpp:15967
+      DiagKind == diag::err_typecheck_convert_incompatible_pointer_sign) {
+    const auto isPlainChar = [](const clang::Type *Type) {
+      return Type->isSpecificBuiltinType(BuiltinType::Char_S) ||
----------------
We don't typically use top-level `const` on value types for local variables.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93999/new/

https://reviews.llvm.org/D93999



More information about the cfe-commits mailing list