================
@@ -3022,18 +3022,24 @@ class CodeGenFunction : public CodeGenTypeCache {
   void EmitBoundsCheck(const Expr *E, const Expr *Base, llvm::Value *Index,
                        QualType IndexType, bool Accessed);
 
+  void EmitBoundsCheck(const Expr *E, llvm::Value *Bound, llvm::Value *Index,
----------------
nickdesaulniers wrote:

This needs a comment added.

https://github.com/llvm/llvm-project/pull/73730/commits/424fe03d6c04eea6a323ba8adec9160e8cf1c980
 demonstrates that having multiple fields with very similar parameter names is 
error prone.

I'm surprised that 
https://github.com/llvm/llvm-project/pull/73730/commits/424fe03d6c04eea6a323ba8adec9160e8cf1c980
 didn't result in test breakage.

I'm kind of curious if we even need another overload of EmitBoundsCheck? Can 
this be implemented within the existing EmitBoundsCheck? Or given a different 
identifier that better distinguishes what it's doing differently than the 
existing EmitsBoundsCheck?  As a fellow developer, it's not clear at the moment 
when I should call one vs the other.

https://github.com/llvm/llvm-project/pull/73730
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to