Initially, we are given a solution containing two salts, they can be either carbonate or chloride salts (we do not know their composition initially).
Generally, $\ce{AgNO3}$ is used as a confirmatory test of $\ce{Cl-}$ (a white precipitate is obtained on adding silver nitrate to solution containing the chloride salt). $$\ce{NaCl + AgNO3 -> NaNO3 + \underset{white}{AgCl} \downarrow}$$ But $$\ce{Na2CO3 + 2AgNO3 -> 2NaNO3 + \underset{brownish white}{Ag2CO3} \downarrow}$$ Therefore, can we use $\ce{AgNO3}$ to directly identify chloride in the solution or do we need to remove the possible carbonate ions to confirm the presence of chloride before performing the test as mentioned above?
(A similar question may arise in the identification of bromide and iodide ions but I have ignored it for now as they are rarely asked in exams. Still, I would appreciate it if someone could answer this as well.)
The question has been asked mainly because the silver nitrate test is generally taught to be performed without mentioning the above precautions and it is also a very famous confirmative test.