[PATCH] D135920: [clang][Sema] Use correct array size for diagnostic
    Kees Cook via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Thu Oct 13 19:54:14 PDT 2022
    
    
  
kees added inline comments.
================
Comment at: clang/test/Sema/array-bounds-ptr-arith.c:15
 {
-	 return (void *)es->s_uuid + 80; // expected-warning {{refers past the end of the array}}
+	 return (void *)es->s_uuid + 80; // expected-warning {{refers past the end of the array (that contains 8 elements)}}
 }
----------------
Can this be changed to `8` from `80` to make sure it is also doing the math right on the check and not just the warning text?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135920/new/
https://reviews.llvm.org/D135920
    
    
More information about the cfe-commits
mailing list