[PATCH] D153690: [clang][Sema] Remove dead diagnostic for loss of __unaligned qualifier
Takuya Shimizu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jun 24 00:19:34 PDT 2023
hazohelet created this revision.
hazohelet added reviewers: aaron.ballman, cjdb, tbaeder, efriedma, rnk.
Herald added a project: All.
hazohelet requested review of this revision.
Herald added a project: clang.
D120936 <https://reviews.llvm.org/D120936> has made the loss of `__unaligned` qualifier NOT a bad-conversion.
Because of this, the bad-conversion note about the loss of this qualifier does not take effect.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D153690
Files:
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaOverload.cpp
Index: clang/lib/Sema/SemaOverload.cpp
===================================================================
--- clang/lib/Sema/SemaOverload.cpp
+++ clang/lib/Sema/SemaOverload.cpp
@@ -10821,15 +10821,6 @@
return;
}
- if (FromQs.hasUnaligned() != ToQs.hasUnaligned()) {
- S.Diag(Fn->getLocation(), diag::note_ovl_candidate_bad_unaligned)
- << (unsigned)FnKindPair.first << (unsigned)FnKindPair.second << FnDesc
- << (FromExpr ? FromExpr->getSourceRange() : SourceRange()) << FromTy
- << FromQs.hasUnaligned() << I + 1;
- MaybeEmitInheritedConstructorNote(S, Cand->FoundDecl);
- return;
- }
-
unsigned CVR = FromQs.getCVRQualifiers() & ~ToQs.getCVRQualifiers();
assert(CVR && "expected qualifiers mismatch");
Index: clang/include/clang/Basic/DiagnosticSemaKinds.td
===================================================================
--- clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ clang/include/clang/Basic/DiagnosticSemaKinds.td
@@ -4696,9 +4696,6 @@
"%select{const|restrict|const and restrict|volatile|const and volatile|"
"volatile and restrict|const, volatile, and restrict}4 qualifier"
"%select{||s||s|s|s}4">;
-def note_ovl_candidate_bad_unaligned : Note<
- "candidate %sub{select_ovl_candidate_kind}0,1,2 not viable: "
- "%ordinal5 argument (%3) would lose __unaligned qualifier">;
def note_ovl_candidate_bad_base_to_derived_conv : Note<
"candidate %sub{select_ovl_candidate_kind}0,1,2 not viable: "
"cannot %select{convert from|convert from|bind}3 "
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153690.534170.patch
Type: text/x-patch
Size: 1570 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230624/7ad556a6/attachment-0001.bin>
More information about the cfe-commits
mailing list