================ @@ -339,6 +425,36 @@ void BlockInCriticalSectionChecker::reportBlockInCritSection( os.str(), ErrNode); R->addRange(Call.getSourceRange()); R->markInteresting(Call.getReturnValue()); + // for 'read' call, check whether it's file descriptor(first argument) is + // created by 'open' API with O_NONBLOCK flag and don't report for this + // situation. + if (Call.getCalleeIdentifier()->getName() == "read") { ---------------- Xazax-hun wrote:
The result of `Call.getCalleeIdentifier()` could be null, e.g., when the name of the function is not a simple identifier (like certain operators). https://github.com/llvm/llvm-project/pull/126752 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits