paulirwin opened a new issue, #1097:
URL: https://github.com/apache/lucenenet/issues/1097

   ### Is there an existing issue for this?
   
   - [X] I have searched the existing issues
   
   ### Task description
   
   We could use some Roslyn analyzers added to our new dev analyzers project 
around `[MethodImpl(MethodImplOptions.NoInlining)]` and StackTraceHelper, found 
while investigating #931:
   
   - NoInlining should not be used on interface methods or abstract methods. 
This attribute is not inherited, so it has no effect there.
   - NoInlining should not be used on empty-bodied methods. Since the test code 
would never be called from an empty-bodied method (since that calls nothing), 
it can never match to the stack trace. So we should not harm performance by 
preventing inlining these methods.
   - NoInlining _should_ be used on methods referenced in a call to 
`StackTraceHelper.DoesStackTraceContainMethod` (perhaps just the two-argument 
version for now that also validates the owning class), and the method body is 
not empty. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to