Emit warning when value and/or gas is set but function does not perform the call

The Solidity documentation warns about using the syntax feed.info{value: 10, gas: 800}, which only sets the value and amount of gas for the function call locally, but does not actually perform the call.

This can be misleading for beginners and could potentially be exploited in underhanded code, such as:

// Misleading function that appears to perform a refund to a smart contract
function refund(address payable recipient, uint256 amount) public payable {
    ...
    // This sets the value but does not perform the call
    recipient.call{value: refund_value};
    ...
}

Shouldn’t Solidity emit a warning when there are functions written in this way?