Depends on the country and the period. In some countries it was and still is impossible to disinherit children and or wives . (e.g. Scotland and France and for a period in England and Wales during the 20th C it was very difficult.) So there can be no, one answer.
In English law, from the mid 1500s until the early twentieth there was some freedom .https://en.m.wikipedia.org/wiki/Legal_history_of_wills Nevertheless, in the wills I've transcribed (mainly relatively wealthy men, 1500s to 1700s) the testator always seems at pains to mention all his sons and at least his unmarried daughters. (The latter sometimes not actually named, just the number mentioned). A lot of land was still entailed and had to be passed in a set line of inheritance. (through eldest son and his sons, then 2nd son and his sons etc) .
I have seen a few wills where the testator specifically excludes one or more sons (saying they have had their share or even they deserve no more) In one case, a wayward son received a token amount, if he should ever reappear. I've also seen wills where provision is made for any possible posthumous child. I think that by including all sons and at least unmarried daughters, testators hoped to prevent costly challenges to the will. (there were enough of these anyway).
So in my experience, for at least this period, wills governed by English law and especially where the testator held land , and there is no other strong evidence otherwise; then absence from the will is a good indicator that a child had died... or was not part of that family and is wrongly linked to the parent.( Sorry about all the caveats in the sentence. I've come across several instances of emigrants being linked to wealthy families with no supporting evidence and found a will with no mention of them.Sometimes people argue that the child existed but was missed out of the will)