It looks like it's trying to help you with Objective C syntax.
At a guess, the files where it's trying to do that have an extension indicating that what you're writing is Objective C. The files where it's not doing it are those that have an extension indicating that they contain C++ instead.