[PATCH] D79830: Add support of __builtin_expect_with_probability

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 26 12:32:54 PDT 2020


erichkeane added a comment.

1 more nit that I saw (don't use an 'else' after an 'if' branch that returns), but otherwise I think this is good from the CFE perspective.  Someone better understanding of LLVM needs to look at the rest though.



================
Comment at: clang/lib/Sema/SemaChecking.cpp:1816
+      return ExprError();
+    } else {
+      llvm::APFloat Probability = Eval.Val.getFloat();
----------------
You don't need the else, since the above branch returns.


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

https://reviews.llvm.org/D79830





More information about the cfe-commits mailing list