logic: fixed bug where anonymous symbols were only partly named like the enclosing typedef
* removed post processing for anonymous typedefs. The storage transformation did not work in cases where the typedef is recorded in a previously indexed header. No type information was recorded while indexing the header a second time. But this type information would have been required by the transformation.
This commit is contained in:
@@ -21,7 +21,6 @@ void SharedIndexerCommand::fromLocal(IndexerCommand* indexerCommand)
|
||||
setCompilerFlags(cmd->getCompilerFlags());
|
||||
setSystemHeaderSearchPaths(cmd->getSystemHeaderSearchPaths());
|
||||
setFrameworkSearchhPaths(cmd->getFrameworkSearchPaths());
|
||||
setShouldApplyAnonymousTypedefTransformation(cmd->shouldApplyAnonymousTypedefTransformation());
|
||||
}
|
||||
else if (dynamic_cast<IndexerCommandCxxManual*>(indexerCommand) != NULL)
|
||||
{
|
||||
@@ -32,7 +31,6 @@ void SharedIndexerCommand::fromLocal(IndexerCommand* indexerCommand)
|
||||
setCompilerFlags(cmd->getCompilerFlags());
|
||||
setSystemHeaderSearchPaths(cmd->getSystemHeaderSearchPaths());
|
||||
setFrameworkSearchhPaths(cmd->getFrameworkSearchPaths());
|
||||
setShouldApplyAnonymousTypedefTransformation(cmd->shouldApplyAnonymousTypedefTransformation());
|
||||
}
|
||||
else if (dynamic_cast<IndexerCommandJava*>(indexerCommand) != NULL)
|
||||
{
|
||||
@@ -61,8 +59,7 @@ std::shared_ptr<IndexerCommand> SharedIndexerCommand::fromShared(const SharedInd
|
||||
indexerCommand.getWorkingDirectory(),
|
||||
indexerCommand.getCompilerFlags(),
|
||||
indexerCommand.getSystemHeaderSearchPaths(),
|
||||
indexerCommand.getFrameworkSearchhPaths(),
|
||||
indexerCommand.shouldApplyAnonymousTypedefTransformation()
|
||||
indexerCommand.getFrameworkSearchhPaths()
|
||||
);
|
||||
return command;
|
||||
}
|
||||
@@ -75,8 +72,7 @@ std::shared_ptr<IndexerCommand> SharedIndexerCommand::fromShared(const SharedInd
|
||||
indexerCommand.getLanguageStandard(),
|
||||
indexerCommand.getSystemHeaderSearchPaths(),
|
||||
indexerCommand.getFrameworkSearchhPaths(),
|
||||
indexerCommand.getCompilerFlags(),
|
||||
indexerCommand.shouldApplyAnonymousTypedefTransformation()
|
||||
indexerCommand.getCompilerFlags()
|
||||
);
|
||||
return command;
|
||||
}
|
||||
@@ -274,16 +270,6 @@ void SharedIndexerCommand::setFrameworkSearchhPaths(const std::vector<FilePath>&
|
||||
}
|
||||
}
|
||||
|
||||
bool SharedIndexerCommand::shouldApplyAnonymousTypedefTransformation() const
|
||||
{
|
||||
return m_shouldApplyAnonymousTypedefTransformation;
|
||||
}
|
||||
|
||||
void SharedIndexerCommand::setShouldApplyAnonymousTypedefTransformation(bool shouldApplyAnonymousTypedefTransformation)
|
||||
{
|
||||
m_shouldApplyAnonymousTypedefTransformation = shouldApplyAnonymousTypedefTransformation;
|
||||
}
|
||||
|
||||
std::vector<FilePath> SharedIndexerCommand::getClassPaths() const
|
||||
{
|
||||
std::vector<FilePath> result;
|
||||
|
||||
@@ -41,9 +41,6 @@ public:
|
||||
std::vector<FilePath> getFrameworkSearchhPaths() const;
|
||||
void setFrameworkSearchhPaths(const std::vector<FilePath>& searchPaths);
|
||||
|
||||
bool shouldApplyAnonymousTypedefTransformation() const;
|
||||
void setShouldApplyAnonymousTypedefTransformation(bool shouldApplyAnonymousTypedefTransformation);
|
||||
|
||||
std::vector<FilePath> getClassPaths() const;
|
||||
void setClassPaths(const std::vector<FilePath>& classPaths);
|
||||
|
||||
@@ -72,7 +69,6 @@ private:
|
||||
SharedMemory::Vector<SharedMemory::String> m_compilerFlags;
|
||||
SharedMemory::Vector<SharedMemory::String> m_systemHeaderSearchPaths;
|
||||
SharedMemory::Vector<SharedMemory::String> m_frameworkSearchPaths;
|
||||
bool m_shouldApplyAnonymousTypedefTransformation;
|
||||
|
||||
// java
|
||||
SharedMemory::Vector<SharedMemory::String> m_classPaths;
|
||||
|
||||
@@ -8,7 +8,6 @@ SourceGroupSettingsCxx::SourceGroupSettingsCxx(const std::string& id, SourceGrou
|
||||
, m_headerSearchPaths(std::vector<FilePath>())
|
||||
, m_frameworkSearchPaths(std::vector<FilePath>())
|
||||
, m_compilerFlags(std::vector<std::string>())
|
||||
, m_shouldApplyAnonymousTypedefTransformation(true)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -25,7 +24,6 @@ void SourceGroupSettingsCxx::load(std::shared_ptr<const ConfigManager> config)
|
||||
setHeaderSearchPaths(getPathValues(key + "/header_search_paths/header_search_path", config));
|
||||
setFrameworkSearchPaths(getPathValues(key + "/framework_search_paths/framework_search_path", config));
|
||||
setCompilerFlags(getValues<std::string>(key + "/compiler_flags/compiler_flag", std::vector<std::string>(), config));
|
||||
setShouldApplyAnonymousTypedefTransformation(getValue<bool>(key + "/should_apply_anonymous_typedef_transformation", true, config));
|
||||
}
|
||||
|
||||
void SourceGroupSettingsCxx::save(std::shared_ptr<ConfigManager> config)
|
||||
@@ -37,7 +35,6 @@ void SourceGroupSettingsCxx::save(std::shared_ptr<ConfigManager> config)
|
||||
setPathValues(key + "/header_search_paths/header_search_path", getHeaderSearchPaths(), config);
|
||||
setPathValues(key + "/framework_search_paths/framework_search_path", getFrameworkSearchPaths(), config);
|
||||
setValues(key + "/compiler_flags/compiler_flag", getCompilerFlags(), config);
|
||||
setValue(key + "/should_apply_anonymous_typedef_transformation", getShouldApplyAnonymousTypedefTransformation(), config);
|
||||
}
|
||||
|
||||
bool SourceGroupSettingsCxx::equals(std::shared_ptr<SourceGroupSettings> other) const
|
||||
@@ -146,16 +143,6 @@ void SourceGroupSettingsCxx::setCompilerFlags(const std::vector<std::string>& co
|
||||
m_compilerFlags = compilerFlags;
|
||||
}
|
||||
|
||||
bool SourceGroupSettingsCxx::getShouldApplyAnonymousTypedefTransformation() const
|
||||
{
|
||||
return m_shouldApplyAnonymousTypedefTransformation;
|
||||
}
|
||||
|
||||
void SourceGroupSettingsCxx::setShouldApplyAnonymousTypedefTransformation(bool shouldApplyAnonymousTypedefTransformation)
|
||||
{
|
||||
m_shouldApplyAnonymousTypedefTransformation = shouldApplyAnonymousTypedefTransformation;
|
||||
}
|
||||
|
||||
std::vector<std::string> SourceGroupSettingsCxx::getDefaultSourceExtensions() const
|
||||
{
|
||||
std::vector<std::string> defaultValues;
|
||||
|
||||
@@ -28,9 +28,6 @@ public:
|
||||
std::vector<std::string> getCompilerFlags() const;
|
||||
void setCompilerFlags(const std::vector<std::string>& compilerFlags);
|
||||
|
||||
bool getShouldApplyAnonymousTypedefTransformation() const;
|
||||
void setShouldApplyAnonymousTypedefTransformation(bool shouldApplyAnonymousTypedefTransformation);
|
||||
|
||||
private:
|
||||
virtual std::vector<std::string> getDefaultSourceExtensions() const;
|
||||
virtual std::string getDefaultStandard() const;
|
||||
@@ -38,7 +35,6 @@ private:
|
||||
std::vector<FilePath> m_headerSearchPaths;
|
||||
std::vector<FilePath> m_frameworkSearchPaths;
|
||||
std::vector<std::string> m_compilerFlags;
|
||||
bool m_shouldApplyAnonymousTypedefTransformation;
|
||||
};
|
||||
|
||||
#endif // SOURCE_GROUP_SETTINGS_CXX_H
|
||||
|
||||
Reference in New Issue
Block a user