Answer:
The function of the underlined noun clause is direct object.
Explanation:
A noun clause is a dependent clause that acts as a noun. That is, they can act as subjects, direct objects, indirect objects, predicate nominatives, or objects of a preposition. In this case, the noun clause is "whatever the cafeteria staff has decided to cook" and it functions as the direct object of the transitive verb to eat.