[PATCH] D45319: [Atomics] warn about misaligned atomic accesses using libcalls
Tim Northover via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 19 06:26:03 PDT 2018
t.p.northover added inline comments.
================
Comment at: clang/lib/CodeGen/CGAtomic.cpp:883
if (UseLibcall) {
+ CGM.getDiags().Report(E->getLocStart(), diag::warn_atomic_op_misaligned);
+
----------------
compnerd wrote:
> It is kinda unfortunate that you need to look up 125 lines to get the context that the call here is implied by a lack of alignment. Perhaps we can rename `UseLibcall` to `UnsuitableAligned` or something?
I'd be OK with that, or I could just move the diagnostic further up so it is next to the definition (or maybe just after to avoid the atomic_init case)?
Repository:
rC Clang
https://reviews.llvm.org/D45319
More information about the cfe-commits
mailing list