data: ClangTool gets invoked for cpp files only, headers are parsed on-the-fly
This change adds the class FileRegister, that splits cpp and h files for the Parser and keeps track which headers have been parsed yet. TranslationUnits get only created for cpp files now, and headers are parsed on the fly. This reduces parse time by around half.
This commit is contained in:
@@ -14,3 +14,13 @@ bool TestFileManager::hasFilePath(const std::string& filePath) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TestFileManager::hasSourceExtension(const std::string& filePath) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TestFileManager::hasIncludeExtension(const std::string& filePath) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,10 @@ class TestFileManager: public FileManager
|
||||
{
|
||||
public:
|
||||
TestFileManager();
|
||||
|
||||
virtual bool hasFilePath(const std::string& filePath) const;
|
||||
virtual bool hasSourceExtension(const std::string& filePath) const;
|
||||
virtual bool hasIncludeExtension(const std::string& filePath) const;
|
||||
};
|
||||
|
||||
#endif // TEST_FILE_MANAGER_H
|
||||
|
||||
Reference in New Issue
Block a user