I have copied and pasted some source code from one old xcode-project to another new project.
Included in the copied code where some @IB
I have same problem. To solve this problem you should (for macOS Catalina 10.15.4, Xcode Version 11.1):
/Users/XXXXX/Library/Developer/Xcode/DerivedData
and delete your cache of project/Users/ХХХХХ /Library/Developer/Xcode/DerivedData/ModuleCache.noindex
and delete all cache from this directoryProduct > Build