i'm trying to write a module pass.
I'm compiling a class with a method having const reference parameter ('void myclass::fn(const struct &r)' )
When I print the IR output, the definition of this function has parameter attributes 'nocapture' 'readonly' 'dereferenceable'
which is expected. But when calling this method in a main, the attribute 'nocapture' and 'readonly' have disapeared and replaced by 'nonnull'; This is confirmed by the method doesNotCapture of the CallSite which return false.
Can anybody explain me why we can not see the original attributes ?