It was a probably a joke, he shouldn't say that, but then again, this is a free country and you cannot censor free speech. Hey, on the left, you have SJWs saying some vicious things towards white conservatives, and even black conservatives who don't think like the BLM crew. Trump needs to tone down the nonsense.
Except you absolutely can censor speech. It's why it is illegal to say bomb on an airplane or fire in a theater. Something that misrepresents a clear and present danger is absolutely illegal. Hate speech is illegal. This is borderline, but only because it is technically "political speech" and the least regulated of all types of speech.