Xcode displaying false code error messages ('Expected expression' and others) This is not a code-level question, per se, but a question about false code error messages.  I would have posted on Apple's developer forums, but the registration page is currently broken.

I'm using Xcode 9.3 on macOS 10.13.4 on a Mac Mini with 16 GB of RAM.  I frequently get false code error messages even when my code is fine.  The false errors are usually Expected expression, Expected ']' and similar. Please see the examples below:

An example of a false error:



Now I retype the same line exactly, and the false error goes away:



Another example:



As you can see, as soon as I retype the same exact code below the 'offending' line, that new line of code doesn't show an error.  As seen in the examples, I have enabled the display of 'invisible' characters to see if maybe some unprintable character was causing a problem, but I don't see anything like that.

Something fishy is going on here.  Am I missing something or is this a bug I need to report?
Even though you can't see any weird characters on the screenshots (or in person) where the error is, there's actually a 'DLE' control code at the end of the line (see image):



I copied the suspect text to another text editor where I discovered the control character.  I do not know how this character got there as I've been typing code and not copy/pasting from the web or other sources.

Deleting the semicolon and everything after it all the way to the new line fixed the problem.  This and other invisible control characters really should be visible when 'view invisibles' are turned on.