My project stopped building overnight without any changes to the code.
Upon closer inspection some of the engine header files like ‘ComponentInstanceDataCache.h’ had some random/illogical class declarations in it that were not present to the original header script (The extra lines looked like ‘class UActor’ followed by class ‘UActorComponent’ etc). This resulted in compilation errors of the form " uactorcomponent should be preceded ‘;’ ".
To fix the issue I had to verify my 4.5.1 installation from the launcher tool and it found the discrepancies and automatically fixed them.
Everything works now, just thought of posting this in case someone else faces the same problem. I’m also curious to know what could cause the corruption of header files in the first place.