We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd3dda7 commit 63d82f6Copy full SHA for 63d82f6
llvm/lib/Analysis/CaptureTracking.cpp
@@ -291,7 +291,7 @@ UseCaptureKind llvm::DetermineUseCaptureKind(
291
// its return value and doesn't unwind (a readonly function can leak bits
292
// by throwing an exception or not depending on the input value).
293
if (Call->onlyReadsMemory() && Call->doesNotThrow() &&
294
- Call->getType()->isVoidTy())
+ (Call->getType()->isVoidTy() || !Call->willReturn()))
295
return UseCaptureKind::NO_CAPTURE;
296
297
// The pointer is not captured if returned pointer is not captured.
0 commit comments