[PATCH] D45319: [Atomics] warn about misaligned atomic accesses using libcalls

Saleem Abdulrasool via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 14 11:23:34 PDT 2018


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

Sorry for the delay, didn't see the changes earlier.



================
Comment at: clang/lib/CodeGen/CGAtomic.cpp:883
   if (UseLibcall) {
+    CGM.getDiags().Report(E->getLocStart(), diag::warn_atomic_op_misaligned);
+
----------------
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?


Repository:
  rC Clang

https://reviews.llvm.org/D45319





More information about the cfe-commits mailing list