ex: if my function in solidity is:
function someFunction(uint256 a, bytes calldata _data) external {
//some stuff
}
would the function signature be the first four bytes of the hash of: someFunction(uint256,bytes)
or would it be the first four bytes of the hash of: someFunction(uint256,bytes calldata)
? or even someFunction(uint256,bytescalldata)
(with no space between bytes and calldata)
No, the data location is not taken into account. From https://solidity.readthedocs.io/en/v0.5.11/abi-spec.html#function-selector (my emphasis):
The first four bytes of the call data for a function call specifies the function to be called. It is the first (left, high-order in big-endian) four bytes of the Keccak-256 (SHA-3) hash of the signature of the function. The signature is defined as the canonical expression of the basic prototype without data location specifier, i.e. the function name with the parenthesised list of parameter types. Parameter types are split by a single comma - no spaces are used.