I see lot of errors like:
The following string was expected to be '.cpp' or '.h':
LyX.cpp: In member function 'void lyx::LyX::printError(const lyx::ErrorItem&)':
Warning: the error was not parsed correctly.
The following string was expected to be '.cpp' or '.h':
LyX.cpp: In function 'void lyx::error_handler(int)':
The script does the following:
All .cpp and .h files in the current directory and subdirectories
are checked to see which include statements could be omitted without
causing a build error.
Many of these omissions would not be desired. For example, currently
if you don't include Undo.h in Undo.cpp, there is no error because
Undo.h is included in Cursor.h which is included in Undo.cpp. But
clearly we do want to include Undo.h in Undo.cpp.
See #6305.