[PATCH] D107527: Mark getc_unlocked as unavailable by default

Ryan Prichard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 5 16:32:06 PDT 2021


rprichard added inline comments.


================
Comment at: llvm/test/Transforms/InferFunctionAttrs/annotate.ll:514
+; CHECK-UNKNOWN: declare i32 @getc_unlocked(%opaque*)
+; CHECK-UNKNOWN-NOT: #{{.*}}
 declare i32 @getc_unlocked(%opaque*)
----------------
MaskRay wrote:
> What does this check?
> 
> Many times it'd be better to replace negative checks with positive checks, with a comment stating that we don't want to see certain things.
> 
> Negative checks can quite easily become stale. For example, if another function is inserted below and it has a `#`, the test will fail weirdly.
I copied it from the similar test cases. I think it's trying to check that the function declaration doesn't have an `#nnn` attribute on the end. Maybe `{{$}}` would be a better way of doing that.

I think I'll upload that in a separate patch.




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107527



More information about the llvm-commits mailing list