Incorrect Xcode Inline Error Reporting

I haven’t tried it yet, sounds like a good idea though

I’ll give this a go in the morning, cheers man.

EDIT: Works great, but needs to be changed every time the Xcode project is regenerated

I’ve had false errors when trying to develop C++ in Xcode. I’ve tried multiple versions of Xcode including the Xcode 8 and the new beta of Xcode 9. Im currently using 4.16.3, but this problem has persisted in Unreal for a few versions.

My steps to reproduce this problem are as follows:

  1. Download unreal from the launcher
  2. Create a new C++ project, Ive been using the first person template
  3. Open up Xcode with the button inside of the Editor
  4. Wait for Xcode to index the project
  5. Open a file with some code in it and more times than not there are errors (but no errors when compiling)

http://i.imgur.com/BPGr4Uv.png

Heres a picture of some of the errors that Im getting, as you can see this is valid code and is actually all from the template, and everything builds fine.

I am having the same issue. It’s exesting with all recents versions of UE4 and Xcode beta from 9.3 to 9.5… as well as 8.3.3.
I saw in in one response to the problem suggestion about bulding the ProjectName_Index target. Have yet to try that myself. Have you tried that ?

I finally found a way to fix the Xcode indexing problem for me which seemed to be the same as you are having.

What I had to do was to Build my ProjectName_Index target and first I seemed to get errors regarding not using C++14, then I changed the project settings to use C++14 instead of C++11 and after Build of ProjectName_Index then the indexing is back and no errors are shown any more.

Great to hear… yeah I notice that it’s changed back. In the source c++14 is widely referenced so I guess that should be the default.

I took a look at the source code of the builder.
The problem is that in XcodeProject.cs there CLANG_CXX_LANGUAGE_STANDARD is set to be c++0x but should be c++14.

With that change the “Refresh Xcode Project” should now work at least this works…
./GenerateProjectFiles.sh -project=“location/project.uproject” -game

Can you create a Bug report for this issue ?

Not 100% sure how to do that, but I moved this thread to the bug reports section

This might also have something do with accepting Xcode recommended settings after “Refresh Xcode project” which overrides the settings that UE4 sets