[PATCH] D14385: Correct atomic libcall support for __atomic_*_fetch builtins.

James Y Knight via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 7 15:55:25 PST 2015


jyknight added inline comments.

================
Comment at: lib/CodeGen/CGAtomic.cpp:901
@@ -897,1 +900,3 @@
+      PostOp = llvm::Instruction::Add;
+    // Fall through.
     case AtomicExpr::AO__c11_atomic_fetch_add:
----------------
compnerd wrote:
> I think we should use `[[clang::fallthrough]]` instead.  It annotates as well as the comment, aids the static analyzer, and should be ignored by compilers that don't support it.
I don't know why, but it appears that this would be the first use of that feature in clang/llvm. Everywhere else uses a comment, so I'd not want to be the first here.


http://reviews.llvm.org/D14385





More information about the cfe-commits mailing list