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:
@@ -21,14 +21,13 @@ public:
|
||||
|
||||
static bool exists(const std::string& path);
|
||||
static std::string fileName(const std::string& path);
|
||||
static std::string extension(const std::string& path);
|
||||
static std::string filePathWithoutExtension(const std::string& path);
|
||||
static std::string absoluteFilePath(const std::string& path);
|
||||
|
||||
static bool equivalent(const std::string& pathA, const std::string& pathB);
|
||||
static std::string extension(const std::string& path);
|
||||
static std::string filePathWithoutExtension(const std::string& path);
|
||||
static bool hasExtension(const std::string& filepath, const std::vector<std::string>& extensions);
|
||||
|
||||
private:
|
||||
static bool isValidExtension(const std::string& filepath, const std::vector<std::string>& extensions);
|
||||
static bool equivalent(const std::string& pathA, const std::string& pathB);
|
||||
};
|
||||
|
||||
#endif // FILE_SYSTEM_H
|
||||
|
||||
Reference in New Issue
Block a user