data: lambda handling

* implemented handling lambdas as functions
* functions can have child nodes now
* NameElements in NameHierarchy can have signatures now.
* fixed crash that occurred when message listener was used while being half way through its destruction process.
This commit is contained in:
malte_langkabel
2015-12-10 18:00:54 +01:00
parent 2b03215ea4
commit 01bcf7266b
22 changed files with 238 additions and 568 deletions
-430
View File
@@ -1,482 +1,52 @@
ConfigManager.cpp WARNING: value path/to/nowhere is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Settings.cpp WARNING: File for Settings not found: data/TestSettings.xml
ConfigManager.cpp WARNING: value source/header_search_paths/header_search_path is not present in config.
Token.cpp ERROR: Location Id was not referenced by this Token.
Edge.cpp ERROR: Edge type_of can't go from Node undefined to Node undefined
Node.cpp WARNING: Cannot change NodeType after it was already set from namespace to class
Edge.cpp ERROR: Edge type_of can't go from Node undefined to Node undefined
Edge.cpp ERROR: Edge type_of can't go from Node undefined to Node undefined
Edge.cpp ERROR: Nodes are not plain copies.
Edge.cpp ERROR: Edge type_of can't go from Node undefined to Node undefined
Edge.cpp ERROR: Edge type_of can't go from Node undefined to Node undefined
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
Edge.cpp ERROR: Edge use can't go from Node undefined to Node undefined
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
Edge.cpp ERROR: Edge use can't go from Node undefined to Node undefined
Edge.cpp ERROR: Edge child can't go from Node undefined to Node undefined
Settings.cpp WARNING: File for Settings not found: data/SettingsTestSuite/wrong_settings.xml
ConfigManager.cpp WARNING: value Bool is not present in config.
ConfigManager.cpp WARNING: value Int is not present in config.
ConfigManager.cpp WARNING: value Float is not present in config.
ConfigManager.cpp WARNING: value String is not present in config.
Settings.cpp WARNING: File for Settings not found: data/SettingsTestSuite/wrong_settings.xml
ConfigManager.cpp WARNING: value Bool is not present in config.
ConfigManager.cpp WARNING: value Int is not present in config.
ConfigManager.cpp WARNING: value Float is not present in config.
ConfigManager.cpp WARNING: value String is not present in config.
ConfigManager.cpp WARNING: value Bool is not present in config.
ConfigManager.cpp WARNING: value Int is not present in config.
ConfigManager.cpp WARNING: value Float is not present in config.
ConfigManager.cpp WARNING: value String is not present in config.
ConfigManager.cpp WARNING: value NewBool is not present in config.
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: typedef: type -> int <file.cpp 1:1 1:1>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: class: Class <file.cpp 1:1 1:1>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: struct: Struct <file.cpp 1:1 1:1>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: global: Global <file.cpp 1:42 1:42>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: global: Global <file.cpp 1:7 1:7>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: field: m_field <file.cpp 1:3 1:3>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: field: Struct::m_field <file.cpp 1:11 1:11>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: function: isTrue <file.cpp 1:14 1:14>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: method: isMethod <file.cpp 1:9 1:9>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: method: Class::isMethod <file.cpp 1:1 1:1>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: namespace: utility <file.cpp 1:1 1:1>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: enum: Category <file.cpp 1:17 1:17>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: enum: Class::Category <file.cpp 1:1 1:1>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: enum constant: VALUE <file.cpp 1:1 1:1>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: class: ClassA <file.cpp 1:0 1:0>
Storage.cpp INFO: class: ClassB <file.cpp 1:0 1:0>
Storage.cpp INFO: inheritance: ClassB : ClassA <file.cpp 1:5 1:5>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: struct: StructA <file.cpp 1:0 1:0>
Storage.cpp INFO: struct: StructB <file.cpp 1:0 1:0>
Storage.cpp INFO: inheritance: StructB : StructA <file.cpp 1:5 1:5>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: method: A::isMethod <file.cpp 1:9 1:9>
Storage.cpp INFO: method: B::isMethod <file.cpp 1:7 1:7>
Storage.cpp INFO: override: A::isMethod -> B::isMethod <file.cpp 1:4 1:4>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: function: isTrue <file.cpp 1:0 1:0>
Storage.cpp INFO: function: func <file.cpp 1:0 1:0>
Storage.cpp INFO: call: isTrue -> func <file.cpp 1:9 1:9>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: global: global <file.cpp 1:0 1:0>
Storage.cpp INFO: function: isTrue <file.cpp 1:0 1:0>
Storage.cpp INFO: call: global -> isTrue <file.cpp 1:7 1:7>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: function: isTrue <file.cpp 1:0 1:0>
Storage.cpp INFO: field: Foo::m_field <file.cpp 1:0 1:0>
Storage.cpp INFO: field usage: isTrue -> Foo::m_field <file.cpp 1:7 1:7>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: function: isTrue <file.cpp 1:0 1:0>
Storage.cpp INFO: global: global <file.cpp 1:0 1:0>
Storage.cpp INFO: global usage: isTrue -> global <file.cpp 1:7 1:7>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: function: isTrue <file.cpp 1:0 1:0>
Storage.cpp INFO: struct: Struct <file.cpp 1:0 1:0>
Storage.cpp INFO: type usage: isTrue -> Struct <file.cpp 1:0 1:0>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: file: file.h < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.h
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.cpp
Storage.cpp INFO: file: file.h < 0:0 0:0>
TextAccess.cpp ERROR: Could not open file file.h
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
Storage.cpp INFO: include: file.h <file.cpp 1:7 1:7>
Storage.cpp INFO: file: file.cpp < 0:0 0:0>
Storage.cpp INFO: file: file.h < 0:0 0:0>
TextAccess.cpp WARNING: Index 'firstLine' has to be lower or equal index 'lastLine', is 3 > 2
TextAccess.cpp WARNING: Tried to access index 10. Maximum index is 8
TextAccess.cpp WARNING: Tried to access index 10. Maximum index is 8
TextAccess.cpp WARNING: Line numbers start with one, is 0
TextAccess.cpp WARNING: Line numbers start with one, is 0
TokenLocationCollection.cpp ERROR: Can't create TokenLocation with wrong boundaries.
TokenLocationCollection.cpp ERROR: Can't create TokenLocation with wrong boundaries.
+29 -36
View File
@@ -239,7 +239,7 @@ Id Storage::onStructParsed(
){
log("struct", nameHierarchy.getFullName(), location);
Id nodeId = addNodeHierarchy(Node::NODE_STRUCT, nameHierarchy, true);
Id nodeId = addNodeHierarchy(Node::NODE_STRUCT, nameHierarchy, scopeLocation.isValid());
addSourceLocation(nodeId, location);
addSourceLocation(nodeId, scopeLocation, true);
@@ -281,7 +281,7 @@ Id Storage::onFunctionParsed(
){
log("function", function.getFullName(), location);
Id nodeId = addNodeHierarchyWithDistinctSignature(Node::NODE_FUNCTION, function, true);
Id nodeId = addNodeHierarchy(Node::NODE_FUNCTION, function, true);
Id returnTypeNodeId = addNodeHierarchy(Node::NODE_TYPE, function.returnType.dataType->getTypeNameHierarchy(), false);
addEdge(nodeId, returnTypeNodeId, Edge::EDGE_TYPE_USAGE, function.returnType.location);
@@ -306,7 +306,7 @@ Id Storage::onMethodParsed(
){
log("method", method.getFullName(), location);
Id nodeId = addNodeHierarchyWithDistinctSignature(Node::NODE_METHOD, method, location.isValid() && scopeLocation.isValid());
Id nodeId = addNodeHierarchy(Node::NODE_METHOD, method, location.isValid() && scopeLocation.isValid());
addSourceLocation(nodeId, location);
addSourceLocation(nodeId, scopeLocation, true);
addAccess(nodeId, access);
@@ -386,8 +386,8 @@ Id Storage::onMethodOverrideParsed(
{
log("override", base.getFullName() + " -> " + overrider.getFullName(), location);
Id baseNodeId = addNodeHierarchyWithDistinctSignature(Node::NODE_FUNCTION, base, false); // TODO: call this overridden
Id overriderNodeId = addNodeHierarchyWithDistinctSignature(Node::NODE_FUNCTION, overrider, false);
Id baseNodeId = addNodeHierarchy(Node::NODE_FUNCTION, base, false); // TODO: call this overridden
Id overriderNodeId = addNodeHierarchy(Node::NODE_FUNCTION, overrider, false);
Id edgeId = addEdge(overriderNodeId, baseNodeId, Edge::EDGE_OVERRIDE, location);
@@ -398,8 +398,8 @@ Id Storage::onCallParsed(const ParseLocation& location, const ParseFunction& cal
{
log("call", caller.getFullName() + " -> " + callee.getFullName(), location);
Id callerNodeId = addNodeHierarchyWithDistinctSignature(Node::NODE_FUNCTION, caller, false);
Id calleeNodeId = addNodeHierarchyWithDistinctSignature(Node::NODE_FUNCTION, callee, false);
Id callerNodeId = addNodeHierarchy(Node::NODE_FUNCTION, caller, false);
Id calleeNodeId = addNodeHierarchy(Node::NODE_FUNCTION, callee, false);
Id edgeId = addEdge(callerNodeId, calleeNodeId, Edge::EDGE_CALL, location);
@@ -411,7 +411,7 @@ Id Storage::onCallParsed(const ParseLocation& location, const ParseVariable& cal
log("call", caller.getFullName() + " -> " + callee.getFullName(), location);
Id callerNodeId = addNodeHierarchy(Node::NODE_UNDEFINED, caller.nameHierarchy, false);
Id calleeNodeId = addNodeHierarchyWithDistinctSignature(Node::NODE_FUNCTION, callee, false);
Id calleeNodeId = addNodeHierarchy(Node::NODE_FUNCTION, callee, false);
Id edgeId = addEdge(callerNodeId, calleeNodeId, Edge::EDGE_CALL, location);
@@ -423,7 +423,7 @@ Id Storage::onFieldUsageParsed(
){
log("field usage", user.getFullName() + " -> " + usedNameHierarchy.getFullName(), location);
Id userNodeId = addNodeHierarchyWithDistinctSignature(Node::NODE_FUNCTION, user, false);
Id userNodeId = addNodeHierarchy(Node::NODE_FUNCTION, user, false);
Id usedNodeId = addNodeHierarchy(Node::NODE_GLOBAL_VARIABLE, usedNameHierarchy, false);
Id edgeId = addEdge(userNodeId, usedNodeId, Edge::EDGE_USAGE, location);
@@ -449,7 +449,7 @@ Id Storage::onGlobalVariableUsageParsed( // or static variable used
){
log("global usage", user.getFullName() + " -> " + usedNameHierarchy.getFullName(), location);
Id userNodeId = addNodeHierarchyWithDistinctSignature(Node::NODE_FUNCTION, user, false);
Id userNodeId = addNodeHierarchy(Node::NODE_FUNCTION, user, false);
Id usedNodeId = addNodeHierarchy(Node::NODE_GLOBAL_VARIABLE, usedNameHierarchy, false);
Id edgeId = addEdge(userNodeId, usedNodeId, Edge::EDGE_USAGE, location);
@@ -475,7 +475,7 @@ Id Storage::onEnumConstantUsageParsed(
){
log("enum constant usage", user.getFullName() + " -> " + usedNameHierarchy.getFullName(), location);
Id userNodeId = addNodeHierarchyWithDistinctSignature(Node::NODE_FUNCTION, user, false);
Id userNodeId = addNodeHierarchy(Node::NODE_FUNCTION, user, false);
Id usedNodeId = addNodeHierarchy(Node::NODE_GLOBAL_VARIABLE, usedNameHierarchy, false);
Id edgeId = addEdge(userNodeId, usedNodeId, Edge::EDGE_USAGE, location);
@@ -505,7 +505,7 @@ Id Storage::onTypeUsageParsed(const ParseTypeUsage& typeUsage, const ParseFuncti
return 0;
}
Id functionNodeId = addNodeHierarchyWithDistinctSignature(Node::NODE_FUNCTION, function, false);
Id functionNodeId = addNodeHierarchy(Node::NODE_FUNCTION, function, false);
Id typeNodeId = addNodeHierarchy(Node::NODE_TYPE, typeUsage.dataType->getTypeNameHierarchy(), false);
Id edgeId = addEdge(functionNodeId, typeNodeId, Edge::EDGE_TYPE_USAGE, typeUsage.location);
@@ -563,7 +563,7 @@ Id Storage::onTemplateArgumentTypeOfTemplateFunctionParsed(
Id argumentNodeId = addNodeHierarchy(Node::NODE_TYPE, argumentTypeNameHierarchy, false);
// does not need a source location because this type that is already defined (and therefore has a location).
Id templateNodeId = addNodeHierarchyWithDistinctSignature(Node::NODE_FUNCTION, templateFunction, false);
Id templateNodeId = addNodeHierarchy(Node::NODE_FUNCTION, templateFunction, false);
addEdge(templateNodeId, argumentNodeId, Edge::EDGE_TEMPLATE_ARGUMENT, location);
@@ -642,9 +642,9 @@ Id Storage::onTemplateMemberFunctionSpecializationParsed(
location
);
Id instantiatedFunctionNodeId = addNodeHierarchyWithDistinctSignature(Node::NODE_FUNCTION, instantiatedFunction, false);
Id instantiatedFunctionNodeId = addNodeHierarchy(Node::NODE_FUNCTION, instantiatedFunction, false);
Id specializedFunctionNodeId = addNodeHierarchyWithDistinctSignature(Node::NODE_FUNCTION, specializedFunction, false);
Id specializedFunctionNodeId = addNodeHierarchy(Node::NODE_FUNCTION, specializedFunction, false);
Id edgeId = addEdge(instantiatedFunctionNodeId, specializedFunctionNodeId, Edge::EDGE_TEMPLATE_MEMBER_SPECIALIZATION_OF, location);
@@ -659,7 +659,7 @@ Id Storage::onTemplateFunctionParameterTypeParsed(
Id parameterNodeId = addNodeHierarchy(Node::NODE_TEMPLATE_PARAMETER_TYPE, templateParameterTypeNameHierarchy, true);
addSourceLocation(parameterNodeId, location, false);
Id functionNodeId = addNodeHierarchyWithDistinctSignature(Node::NODE_FUNCTION, function, false);
Id functionNodeId = addNodeHierarchy(Node::NODE_FUNCTION, function, false);
addEdge(functionNodeId, parameterNodeId, Edge::EDGE_TEMPLATE_PARAMETER, location);
return parameterNodeId;
@@ -670,10 +670,10 @@ Id Storage::onTemplateFunctionSpecializationParsed(
){
log("function template specialization", specializedFunction.getFullName(), location);
Id specializedNodeId = addNodeHierarchyWithDistinctSignature(Node::NODE_FUNCTION, specializedFunction, true);
Id specializedNodeId = addNodeHierarchy(Node::NODE_FUNCTION, specializedFunction, true);
addSourceLocation(specializedNodeId, location, false);
Id functionNodeId = addNodeHierarchyWithDistinctSignature(Node::NODE_FUNCTION, templateFunction, false);
Id functionNodeId = addNodeHierarchy(Node::NODE_FUNCTION, templateFunction, false);
addAccess(specializedNodeId, getAccess(functionNodeId));
addEdge(specializedNodeId, functionNodeId, Edge::EDGE_TEMPLATE_SPECIALIZATION_OF, location);
@@ -1294,7 +1294,7 @@ TimePoint Storage::getFileModificationTime(const FilePath& filePath) const
return TimePoint(m_sqliteStorage.getFileByPath(filePath.str()).modificationTime);
}
Id Storage::addNodeHierarchy(Node::NodeType nodeType, NameHierarchy nameHierarchy, bool defined, bool distinct)
Id Storage::addNodeHierarchy(Node::NodeType nodeType, NameHierarchy nameHierarchy, bool defined)
{
std::vector<Id> nameIds = addNameHierarchyElements(nameHierarchy);
@@ -1314,9 +1314,15 @@ Id Storage::addNodeHierarchy(Node::NodeType nodeType, NameHierarchy nameHierarch
m_sqliteStorage.setNodeDefined(true, nodeId);
}
if (nodeId == 0 || (lastName && distinct))
if (nodeId == 0)
{
nodeId = m_sqliteStorage.addNode(Node::typeToInt(type), nameId, lastName & defined);
nodeId = m_sqliteStorage.addNode(Node::typeToInt(type), nameId, lastName && defined);
std::string signature = nameHierarchy[i]->getFullSignature();
if (signature.size() != 0)
{
m_sqliteStorage.addSignature(nodeId, signature);
}
if (parentNodeId != 0)
{
@@ -1338,22 +1344,9 @@ Id Storage::addNodeHierarchy(Node::NodeType nodeType, NameHierarchy nameHierarch
return parentNodeId;
}
Id Storage::addNodeHierarchyWithDistinctSignature(Node::NodeType type, const ParseFunction& function, bool defined)
Id Storage::addNodeHierarchy(Node::NodeType type, const ParseFunction& function, bool defined)
{
std::string signature = ParserClient::functionSignatureStr(function);
Id nodeId = m_sqliteStorage.getNodeIdBySignature(signature);
if (!nodeId)
{
nodeId = addNodeHierarchy(type, function.nameHierarchy, defined, true);
m_sqliteStorage.addSignature(nodeId, signature);
}
else if (defined)
{
m_sqliteStorage.setNodeDefined(true, nodeId);
}
return nodeId;
return addNodeHierarchy(type, function.nameHierarchy, defined);
}
std::vector<Id> Storage::addNameHierarchyElements(NameHierarchy nameHierarchy)
+2 -2
View File
@@ -170,8 +170,8 @@ public:
virtual TimePoint getFileModificationTime(const FilePath& filePath) const;
private:
Id addNodeHierarchy(Node::NodeType nodeType, NameHierarchy nameHierarchy, bool defined, bool distinct = false);
Id addNodeHierarchyWithDistinctSignature(Node::NodeType type, const ParseFunction& function, bool defined);
Id addNodeHierarchy(Node::NodeType nodeType, NameHierarchy nameHierarchy, bool defined);
Id addNodeHierarchy(Node::NodeType type, const ParseFunction& function, bool defined);
std::vector<Id> addNameHierarchyElements(NameHierarchy nameHierarchy);
Id addSourceLocation(Id elementNodeId, const ParseLocation &location, bool isScope = false);
+12
View File
@@ -2,6 +2,13 @@
NameElement::NameElement(const std::string& name)
: m_name(name)
, m_signature("")
{
}
NameElement::NameElement(const std::string& name, const std::string& signature)
: m_name(name)
, m_signature(signature)
{
}
@@ -13,3 +20,8 @@ std::string NameElement::getFullName() const
{
return m_name;
}
std::string NameElement::getFullSignature() const
{
return m_signature;
}
+3
View File
@@ -7,12 +7,15 @@ class NameElement
{
public:
NameElement(const std::string& name);
NameElement(const std::string& name, const std::string& signature);
~NameElement();
std::string getFullName() const;
std::string getFullSignature() const;
private:
std::string m_name;
std::string m_signature;
};
#endif // NAME_ELEMENT_H
+1 -1
View File
@@ -23,7 +23,7 @@ void NameHierarchy::pop()
m_elements.pop_back();
}
std::shared_ptr<NameElement> NameHierarchy::back()
std::shared_ptr<NameElement> NameHierarchy::back() const
{
return m_elements.back();
}
+1 -1
View File
@@ -16,7 +16,7 @@ public:
void push(std::shared_ptr<NameElement> element);
void pop();
std::shared_ptr<NameElement> back();
std::shared_ptr<NameElement> back() const;
std::shared_ptr<NameElement> operator[](size_t pos) const;
size_t size() const;
+3 -7
View File
@@ -111,14 +111,10 @@ std::string ParserClient::parameterStr(const std::vector<ParseTypeUsage> paramet
std::string ParserClient::functionStr(const ParseFunction& function)
{
//return function.getFullName();
std::string str =
function.returnType.dataType->getFullTypeName() + " " + function.getFullName() + parameterStr(function.parameters);
return addConstPrefix(addStaticPrefix(str, function.isStatic), function.isConst, false);
}
std::string ParserClient::functionSignatureStr(const ParseFunction& function)
{
return addConstPrefix(function.getFullName() + parameterStr(function.parameters), function.isConst, false);
function.returnType.dataType->getFullTypeName() + " " + function.getFullName();
return addStaticPrefix(str, function.isStatic);
}
ParserClient::ParserClient()
+1 -1
View File
@@ -50,7 +50,7 @@ public:
static std::string variableStr(const ParseVariable& variable);
static std::string parameterStr(const std::vector<ParseTypeUsage> parameters);
static std::string functionStr(const ParseFunction& function);
static std::string functionSignatureStr(const ParseFunction& function);
static std::string functionSignatureStr(const ParseFunction& function); // should this be in here? consider languages other than c++.
ParserClient();
virtual ~ParserClient();
+3 -3
View File
@@ -15,17 +15,17 @@ public:
{
}
virtual std::string getType() const
private:
virtual std::string doGetType() const
{
return MessageType::getStaticType();
}
virtual void handleMessageBase(MessageBase* message)
virtual void doHandleMessageBase(MessageBase* message)
{
handleMessage(dynamic_cast<MessageType*>(message));
}
private:
virtual void handleMessage(MessageType* message) = 0;
};
@@ -12,12 +12,14 @@ class MessageListenerBase
public:
MessageListenerBase()
: m_id(s_nextId++)
, m_alive(true)
{
MessageQueue::getInstance()->registerListener(this);
}
virtual ~MessageListenerBase()
{
m_alive = false;
MessageQueue::getInstance()->unregisterListener(this);
}
@@ -26,14 +28,31 @@ public:
return m_id;
}
virtual std::string getType() const = 0;
std::string getType() const
{
if (m_alive)
{
return doGetType();
}
return "";
}
virtual void handleMessageBase(MessageBase*) = 0;
void handleMessageBase(MessageBase* message)
{
if (m_alive)
{
doHandleMessageBase(message);
}
}
private:
virtual std::string doGetType() const = 0;
virtual void doHandleMessageBase(MessageBase*) = 0;
static uint s_nextId;
uint m_id;
bool m_alive;
};
#endif // MESSAGE_LISTENER_BASE_H
@@ -38,30 +38,13 @@ void ASTBodyVisitor::VisitChildren(clang::Stmt* stmt)
void ASTBodyVisitor::VisitCallExpr(clang::CallExpr* expr)
{
bool ignore = false;
// check if lambda call
if (clang::isa<clang::CXXOperatorCallExpr>(expr))
if (m_functionDecl)
{
clang::Decl* calleeDecl = expr->getCalleeDecl();
if (calleeDecl && clang::isa<clang::CXXMethodDecl>(calleeDecl))
{
clang::CXXRecordDecl* recordDecl = clang::dyn_cast<clang::CXXMethodDecl>(calleeDecl)->getParent();
ignore = recordDecl->isLambda();
}
m_client->VisitCallExprInDeclBody(m_functionDecl, expr);
}
if (!ignore)
else
{
if (m_functionDecl)
{
m_client->VisitCallExprInDeclBody(m_functionDecl, expr);
}
else
{
m_client->VisitCallExprInDeclBody(m_varDecl, expr);
}
m_client->VisitCallExprInDeclBody(m_varDecl, expr);
}
VisitStmt(expr);
@@ -176,6 +159,11 @@ void ASTBodyVisitor::VisitDeclRefExpr(clang::DeclRefExpr* expr)
VisitStmt(expr);
}
void ASTBodyVisitor::VisitLambdaExpr(clang::LambdaExpr* expr)
{
// Don't visit the lambda's children. The ASTVisitor creates a new ASTBodyVisitor for these.
}
void ASTBodyVisitor::VisitDeclStmt(clang::DeclStmt* stmt)
{
for (clang::Decl* decl : stmt->decls())
@@ -20,6 +20,7 @@ public:
void VisitCXXNewExpr(clang::CXXNewExpr* expr);
void VisitMemberExpr(clang::make_ptr<clang::MemberExpr>::type expr);
void VisitDeclRefExpr(clang::make_ptr<clang::DeclRefExpr>::type expr);
void VisitLambdaExpr(clang::LambdaExpr* expr);
void VisitDeclStmt(clang::DeclStmt* stmt);
private:
+11 -2
View File
@@ -166,6 +166,15 @@ bool ASTVisitor::VisitFunctionDecl(clang::FunctionDecl* declaration)
return true;
}
bool ASTVisitor::VisitLambdaExpr(clang::LambdaExpr* expr)
{
if (isLocatedInUnparsedProjectFile(expr->getCallOperator()))
{
processFunctionDecl(expr->getCallOperator());
}
return true;
}
bool ASTVisitor::VisitParmVarDecl(clang::ParmVarDecl* declaration)
{
// todo: handle parameters here!
@@ -755,7 +764,7 @@ void ASTVisitor::processFunctionDecl(clang::FunctionDecl* declaration)
getParseLocationForNamedDecl(declaration),
getParseFunction(declaration),
getParseLocationOfFunctionBody(declaration)
);
);
// handle template arguments of return type.
clang::TypeLoc functionLoc = declaration->getTypeSourceInfo()->getTypeLoc();
@@ -772,7 +781,7 @@ void ASTVisitor::processFunctionDecl(clang::FunctionDecl* declaration)
if (declaration->hasBody() &&
declaration->isThisDeclarationADefinition() &&
!declaration->isDependentContext()
)
)
{
ASTBodyVisitor bodyVisitor(this, declaration);
bodyVisitor.Visit(declaration->getBody());
+1 -2
View File
@@ -32,6 +32,7 @@ public:
virtual bool VisitVarDecl(clang::VarDecl* declaration); // global variables and static fields
virtual bool VisitFieldDecl(clang::FieldDecl* declaration); // fields
virtual bool VisitFunctionDecl(clang::FunctionDecl* declaration); // functions
virtual bool VisitLambdaExpr(clang::LambdaExpr* expr); // lambdas
virtual bool VisitParmVarDecl(clang::ParmVarDecl* declaration);
virtual bool VisitCXXMethodDecl(clang::CXXMethodDecl* declaration); // methods
virtual bool VisitCXXConstructorDecl(clang::CXXConstructorDecl* declaration); // initialization list
@@ -67,14 +68,12 @@ public:
virtual void VisitVarDeclInDeclBody(clang::FunctionDecl* decl, clang::VarDecl* varDecl); // type usages
private:
void processFunctionDecl(clang::FunctionDecl* declaration);
void processTemplateArgumentsOfExplicitSpecialization(clang::FunctionDecl* declaration);
void processTemplateArgumentsOfExplicitSpecialization(clang::ClassTemplateSpecializationDecl* specializationDecl);
void processTemplateArguments(clang::DeclRefExpr* expr);
void processTemplateArguments(clang::TemplateSpecializationTypeLoc loc);
bool isLocatedInUnparsedProjectFile(const clang::Decl* declaration) const;
bool isLocatedInProjectFile(const ParseLocation& location) const;
bool isLocatedInProjectFile(const clang::Decl* declaration) const;
@@ -29,7 +29,7 @@ NameHierarchy CxxDeclNameResolver::getDeclNameHierarchy()
NameHierarchy contextNameHierarchy;
if (m_declaration)
{
std::string declName = "";
std::shared_ptr<NameElement> declName;
if (clang::isa<clang::NamedDecl>(m_declaration))
{
@@ -47,13 +47,13 @@ NameHierarchy CxxDeclNameResolver::getDeclNameHierarchy()
clang::isa<clang::TemplateTemplateParmDecl>(m_declaration)) &&
contextNameHierarchy.size() > 0)
{
std::string lastContextElementName = contextNameHierarchy.back()->getFullName();
std::string lastContextElementName = contextNameHierarchy.back()->getFullName(); // TODO: what about the signature in this case?
contextNameHierarchy.pop();
contextNameHierarchy.push(std::make_shared<NameElement>(lastContextElementName + "::" + declName));
contextNameHierarchy.push(std::make_shared<NameElement>(lastContextElementName + "::" + declName->getFullName()));
}
else
{
contextNameHierarchy.push(std::make_shared<NameElement>(declName));
contextNameHierarchy.push(declName);
}
}
return contextNameHierarchy;
@@ -73,26 +73,26 @@ NameHierarchy CxxDeclNameResolver::getContextNameHierarchy(const clang::DeclCont
if (clang::isa<clang::NamedDecl>(declContext))
{
std::string declName = getDeclName(clang::dyn_cast<clang::NamedDecl>(declContext));
if (declName != "")
std::shared_ptr<NameElement> declName = getDeclName(clang::dyn_cast<clang::NamedDecl>(declContext));
if (declName)
{
contextNameHierarchy.push(std::make_shared<NameElement>(declName));
contextNameHierarchy.push(declName);
}
}
}
return contextNameHierarchy;
}
std::string CxxDeclNameResolver::getDeclName()
std::shared_ptr<NameElement> CxxDeclNameResolver::getDeclName()
{
const clang::NamedDecl* declaration = clang::dyn_cast<clang::NamedDecl>(m_declaration);
std::string declName = declaration->getNameAsString();
std::string declNameString = declaration->getNameAsString();
if (clang::isa<clang::CXXRecordDecl>(declaration))
{
clang::ClassTemplateDecl* templateClassDeclaration = clang::dyn_cast<clang::CXXRecordDecl>(declaration)->getDescribedClassTemplate();
if (templateClassDeclaration)
{
declName = getDeclName(templateClassDeclaration);
return getDeclName(templateClassDeclaration);
}
else if (clang::isa<clang::ClassTemplatePartialSpecializationDecl>(declaration))
{
@@ -129,7 +129,7 @@ std::string CxxDeclNameResolver::getDeclName()
specializedParameterNamePart += (i < templateArgumentCount - 1) ? ", " : "";
}
specializedParameterNamePart += ">";
declName += specializedParameterNamePart;
return std::make_shared<NameElement>(declNameString + specializedParameterNamePart);
}
else if (clang::isa<clang::ClassTemplateSpecializationDecl>(declaration))
{
@@ -141,29 +141,78 @@ std::string CxxDeclNameResolver::getDeclName()
templateArgumentNamePart += (i < templateArgumentList.size() - 1) ? ", " : "";
}
templateArgumentNamePart += ">";
declName += templateArgumentNamePart;
return std::make_shared<NameElement>(declNameString + templateArgumentNamePart);
}
}
else if (clang::isa<clang::FunctionDecl>(declaration))
{
clang::FunctionTemplateDecl* templateFunctionDeclaration = clang::dyn_cast<clang::FunctionDecl>(declaration)->getDescribedFunctionTemplate();
if (templateFunctionDeclaration)
if (const clang::CXXMethodDecl* methodDecl = clang::dyn_cast_or_null<clang::CXXMethodDecl>(declaration))
{
declName = getDeclName(templateFunctionDeclaration);
}
else if (clang::dyn_cast<clang::FunctionDecl>(declaration)->isFunctionTemplateSpecialization())
{
std::string templateArgumentNamePart = "<";
const clang::TemplateArgumentList* templateArgumentList = clang::dyn_cast<clang::FunctionDecl>(declaration)->getTemplateSpecializationArgs();
for (size_t i = 0; i < templateArgumentList->size(); i++)
if (methodDecl->getParent()->isLambda())
{
const clang::TemplateArgument& templateArgument = templateArgumentList->get(i);
templateArgumentNamePart += getTemplateArgumentName(templateArgument);
templateArgumentNamePart += (i < templateArgumentList->size() - 1) ? ", " : "";
const clang::SourceManager& sourceManager = declaration->getASTContext().getSourceManager();
const clang::PresumedLoc& presumedBegin = sourceManager.getPresumedLoc(methodDecl->getParent()->getLocStart());
std::string lambdaName = "lambda at " + std::to_string(presumedBegin.getLine()) + ":" + std::to_string(presumedBegin.getColumn());
return std::make_shared<NameElement>(lambdaName, lambdaName);
}
templateArgumentNamePart += ">";
declName += templateArgumentNamePart;
}
const clang::FunctionDecl* functionDecl = clang::dyn_cast<clang::FunctionDecl>(declaration);
if (clang::FunctionTemplateDecl* templateFunctionDeclaration = functionDecl->getDescribedFunctionTemplate())
{
return getDeclName(templateFunctionDeclaration);
}
else
{
std::string functionName = declNameString;
if (functionDecl->isFunctionTemplateSpecialization())
{
std::string templateArgumentNamePart = "<";
const clang::TemplateArgumentList* templateArgumentList = functionDecl->getTemplateSpecializationArgs();
for (size_t i = 0; i < templateArgumentList->size(); i++)
{
const clang::TemplateArgument& templateArgument = templateArgumentList->get(i);
templateArgumentNamePart += getTemplateArgumentName(templateArgument);
templateArgumentNamePart += (i < templateArgumentList->size() - 1) ? ", " : "";
}
templateArgumentNamePart += ">";
functionName += templateArgumentNamePart;
}
bool isStatic = false;
bool isConst = false;
if (clang::isa<clang::CXXMethodDecl>(declaration))
{
const clang::CXXMethodDecl* methodDecl = clang::dyn_cast<const clang::CXXMethodDecl>(declaration);
isStatic = methodDecl->isStatic();
isConst = methodDecl->isConst();
}
else
{
isStatic = functionDecl->getStorageClass() == clang::SC_Static;
}
CxxTypeNameResolver typenNameResolver(getIgnoredContextDecls());
std::string returnTypeString = typenNameResolver.qualTypeToDataType(functionDecl->getReturnType())->getFullTypeName();
std::string parameterString = "(";
for (unsigned int i = 0; i < functionDecl->param_size(); i++)
{
parameterString += typenNameResolver.qualTypeToDataType(functionDecl->parameters()[i]->getType())->getFullTypeName();
if (i < functionDecl->param_size() - 1)
{
parameterString += ", ";
}
}
parameterString += ")";
return std::make_shared<NameElement>(
functionName + parameterString + (isConst ? "const" : ""),
(isStatic ? "static " : "") + returnTypeString + " " + functionName + parameterString + (isConst ? " const" : ""));
}
}
else if (clang::isa<clang::TemplateDecl>(declaration)) // also triggers on TemplateTemplateParmDecl
{
@@ -175,25 +224,29 @@ std::string CxxDeclNameResolver::getDeclName()
templateParameterNamePart += (i < parameterList->size() - 1) ? ", " : "";
}
templateParameterNamePart += ">";
declName += templateParameterNamePart;
return std::make_shared<NameElement>(declNameString + templateParameterNamePart);
}
else if (clang::isa<clang::NamespaceDecl>(declaration) && clang::dyn_cast<clang::NamespaceDecl>(declaration)->isAnonymousNamespace())
{
const clang::SourceManager& sourceManager = declaration->getASTContext().getSourceManager();
const clang::PresumedLoc& presumedBegin = sourceManager.getPresumedLoc(declaration->getLocStart());
declName = "anonymous namespace (" + FilePath(presumedBegin.getFilename()).fileName() + ")";
return std::make_shared<NameElement>("anonymous namespace (" + FilePath(presumedBegin.getFilename()).fileName() + ")");
}
else if (clang::isa<clang::EnumDecl>(declaration) && declName.size() == 0)
else if (clang::isa<clang::EnumDecl>(declaration) && declNameString.size() == 0)
{
const clang::SourceManager& sourceManager = declaration->getASTContext().getSourceManager();
const clang::PresumedLoc& presumedBegin = sourceManager.getPresumedLoc(declaration->getLocStart());
declName = "anonymous enum (" + FilePath(presumedBegin.getFilename()).fileName() + ")";
return std::make_shared<NameElement>("anonymous enum (" + FilePath(presumedBegin.getFilename()).fileName() + ")");
}
return declName;
if (declNameString.size() > 0)
{
return std::make_shared<NameElement>(declNameString);
}
return std::shared_ptr<NameElement>();
}
std::string CxxDeclNameResolver::getDeclName(const clang::NamedDecl* declaration)
std::shared_ptr<NameElement> CxxDeclNameResolver::getDeclName(const clang::NamedDecl* declaration)
{
CxxDeclNameResolver resolver(declaration);
return resolver.getDeclName();
@@ -9,14 +9,14 @@ class CxxDeclNameResolver: public CxxNameResolver
public:
CxxDeclNameResolver(const clang::Decl* declaration);
CxxDeclNameResolver(const clang::Decl* declaration, std::vector<const clang::Decl*> ignoredContextDecls);
~CxxDeclNameResolver();
virtual ~CxxDeclNameResolver();
NameHierarchy getDeclNameHierarchy();
std::string getDeclName();
std::shared_ptr<NameElement> getDeclName();
private:
NameHierarchy getContextNameHierarchy(const clang::DeclContext* declaration);
std::string getDeclName(const clang::NamedDecl* declaration);
std::shared_ptr<NameElement> getDeclName(const clang::NamedDecl* declaration);
std::string getTemplateParameterString(const clang::NamedDecl* parameter);
std::string getTemplateParameterTypeString(const clang::NonTypeTemplateParmDecl* parameter);
std::string getTemplateParameterTypeString(const clang::TemplateTypeParmDecl* parameter);
@@ -9,7 +9,7 @@ class CxxNameResolver
{
public:
CxxNameResolver(std::vector<const clang::Decl*> ignoredContextDecls);
~CxxNameResolver();
virtual ~CxxNameResolver();
void ignoreContextDecl(const clang::Decl* decl);
bool ignoresContext(const clang::DeclContext* declContext);
@@ -12,7 +12,7 @@ class CxxTemplateArgumentNameResolver: public CxxNameResolver
public:
CxxTemplateArgumentNameResolver();
CxxTemplateArgumentNameResolver(std::vector<const clang::Decl*> ignoredContextDecls);
~CxxTemplateArgumentNameResolver();
virtual ~CxxTemplateArgumentNameResolver();
std::string getTemplateArgumentName(const clang::TemplateArgument& argument);
};
@@ -9,7 +9,7 @@ class CxxTypeNameResolver: public CxxNameResolver
public:
CxxTypeNameResolver();
CxxTypeNameResolver(std::vector<const clang::Decl*> ignoredContextDecls);
~CxxTypeNameResolver();
virtual ~CxxTypeNameResolver();
std::shared_ptr<DataType> qualTypeToDataType(clang::QualType qualType);
+44 -18
View File
@@ -114,12 +114,34 @@ public:
" {\n"
" };\n"
"};\n"
);
);
TS_ASSERT_EQUALS(client->structs.size(), 1);
TS_ASSERT_EQUALS(client->structs[0], "A::B <3:2 <3:9 3:9> 5:2>");
}
void test_cxx_parser_finds_struct_definition_in_function()
{
std::shared_ptr<TestParserClient> client = parseCode(
"void foo(int)\n"
"{\n"
" struct B\n"
" {\n"
" };\n"
"};\n"
"void foo(float)\n"
"{\n"
" struct B\n"
" {\n"
" };\n"
"};\n"
);
TS_ASSERT_EQUALS(client->structs.size(), 2);
TS_ASSERT_EQUALS(client->structs[0], "foo(int)::B <3:2 <3:9 3:9> 5:2>");
TS_ASSERT_EQUALS(client->structs[1], "foo(float)::B <9:2 <9:9 9:9> 11:2>");
}
void test_cxx_parser_finds_variable_definitions_in_global_scope()
{
std::shared_ptr<TestParserClient> client = parseCode(
@@ -306,7 +328,7 @@ public:
);
TS_ASSERT_EQUALS(client->methods.size(), 1);
TS_ASSERT_EQUALS(client->methods[0], "private bool B::C::isGreat() const <5:8 5:14>");
TS_ASSERT_EQUALS(client->methods[0], "private bool B::C::isGreat()const <5:8 5:14>");
}
void test_cxx_parser_finds_named_namespace()
@@ -1788,7 +1810,7 @@ public:
"}\n"
);
TS_ASSERT_EQUALS(client->templateMemberSpecializations.size(), 1);
TS_ASSERT_EQUALS(client->templateMemberSpecializations[0], "A<int>::foo -> A<typename T>::foo <0:0 0:0>");
TS_ASSERT_EQUALS(client->templateMemberSpecializations[0], "A<int>::foo() -> A<typename T>::foo() <0:0 0:0>");
}
void test_cxx_parser_finds_explicit_template_specialization()
@@ -2507,7 +2529,7 @@ public:
);
TS_ASSERT_EQUALS(client->templateSpecializations.size(), 1);
TS_ASSERT_EQUALS(client->templateSpecializations[0], "test<int> -> test<typename T> <2:3 2:6>");
TS_ASSERT_EQUALS(client->templateSpecializations[0], "test<int>(int) -> test<typename T> <2:3 2:6>");
}
void test_cxx_parser_finds_explicit_specialization_of_template_function()
@@ -2527,7 +2549,7 @@ public:
);
TS_ASSERT_EQUALS(client->templateSpecializations.size(), 1);
TS_ASSERT_EQUALS(client->templateSpecializations[0], "test<int> -> test<typename T> <8:5 8:8>");
TS_ASSERT_EQUALS(client->templateSpecializations[0], "test<int>(int) -> test<typename T> <8:5 8:8>");
}
void test_cxx_parser_finds_explicit_type_template_argument_of_explicit_specialization_of_template_function()
@@ -2544,7 +2566,7 @@ public:
"};\n"
);
TS_ASSERT_EQUALS(client->templateArgumentTypes.size(), 1);
TS_ASSERT_EQUALS(client->templateArgumentTypes[0], "test<int>->int <7:11 7:11>");
TS_ASSERT_EQUALS(client->templateArgumentTypes[0], "test<int>()->int <7:11 7:11>");
}
void test_cxx_parser_finds_explicit_type_template_argument_of_function_call_in_function()
@@ -2560,7 +2582,7 @@ public:
"};\n"
);
TS_ASSERT_EQUALS(client->templateArgumentTypes.size(), 1);
TS_ASSERT_EQUALS(client->templateArgumentTypes[0], "test<int>->int <6:7 6:7>");
TS_ASSERT_EQUALS(client->templateArgumentTypes[0], "test<int>()->int <6:7 6:7>");
}
void test_cxx_parser_finds_explicit_non_type_template_argument_of_function_call_in_function()
@@ -2576,7 +2598,7 @@ public:
"};\n"
);
TS_ASSERT_EQUALS(client->templateArgumentTypes.size(), 1);
TS_ASSERT_EQUALS(client->templateArgumentTypes[0], "test<33>->int <6:7 6:7>");
TS_ASSERT_EQUALS(client->templateArgumentTypes[0], "test<33>()->int <6:7 6:7>");
}
void test_cxx_parser_finds_explicit_template_template_argument_of_function_call_in_function()
@@ -2593,7 +2615,7 @@ public:
"};\n"
);
TS_ASSERT_EQUALS(client->templateArgumentTypes.size(), 1);
TS_ASSERT_EQUALS(client->templateArgumentTypes[0], "test<A>->A<typename T> <7:7 7:7>");
TS_ASSERT_EQUALS(client->templateArgumentTypes[0], "test<A>()->A<typename T> <7:7 7:7>");
}
void test_cxx_parser_finds_implicit_type_template_argument_of_function_call_in_function()
@@ -2609,7 +2631,7 @@ public:
"};\n"
);
TS_ASSERT_EQUALS(client->templateArgumentTypes.size(), 1);
TS_ASSERT_EQUALS(client->templateArgumentTypes[0], "test<int>->int <6:5 6:5>");
TS_ASSERT_EQUALS(client->templateArgumentTypes[0], "test<int>(int)->int <6:5 6:5>");
}
void test_cxx_parser_finds_explicit_type_template_argument_of_function_call_in_var_decl()
@@ -2624,7 +2646,7 @@ public:
"};\n"
);
TS_ASSERT_EQUALS(client->templateArgumentTypes.size(), 1);
TS_ASSERT_EQUALS(client->templateArgumentTypes[0], "test<int>->int <6:17 6:17>");
TS_ASSERT_EQUALS(client->templateArgumentTypes[0], "test<int>()->int <6:17 6:17>");
}
void test_cxx_parser_finds_implicit_type_template_argument_of_function_call_in_var_decl()
@@ -2639,7 +2661,7 @@ public:
"};\n"
);
TS_ASSERT_EQUALS(client->templateArgumentTypes.size(), 1);
TS_ASSERT_EQUALS(client->templateArgumentTypes[0], "test<int>->int <6:15 6:15>");
TS_ASSERT_EQUALS(client->templateArgumentTypes[0], "test<int>(int)->int <6:15 6:15>");
}
@@ -2693,7 +2715,7 @@ public:
"A<typename T> -> test<template<typename> typename T>::T<typename> <4:40 4:40>");
}
void test_cxx_parser_ignores_lambda_in_function()
void test_cxx_parser_finds_lambda_in_function()
{
std::shared_ptr<TestParserClient> client = parseCode(
"void lambdaCaller()\n"
@@ -2702,9 +2724,11 @@ public:
"}\n"
);
TS_ASSERT_EQUALS(client->functions.size(), 1);
TS_ASSERT_EQUALS(client->functions.size(), 2);
TS_ASSERT_EQUALS(client->functions[0], "void lambdaCaller() <1:1 <1:6 1:17> 4:1>");
TS_ASSERT_EQUALS(client->calls.size(), 0);
TS_ASSERT_EQUALS(client->functions[1], "void lambdaCaller()::lambda at 3:2 <3:5 <3:2 3:2> 3:7>");
TS_ASSERT_EQUALS(client->calls.size(), 1);
TS_ASSERT_EQUALS(client->calls[0], "void lambdaCaller() -> void lambdaCaller()::lambda at 3:2 <3:2 3:9>");
}
void test_cxx_parser_ignores_lambda_in_function_but_still_finds_call_within()
@@ -2720,11 +2744,13 @@ public:
"}\n"
);
TS_ASSERT_EQUALS(client->functions.size(), 2);
TS_ASSERT_EQUALS(client->functions.size(), 3);
TS_ASSERT_EQUALS(client->functions[0], "void func() <1:1 <1:6 1:9> 1:14>");
TS_ASSERT_EQUALS(client->functions[1], "void lambdaCaller() <2:1 <2:6 2:17> 8:1>");
TS_ASSERT_EQUALS(client->calls.size(), 1);
TS_ASSERT_EQUALS(client->calls[0], "void lambdaCaller() -> void func() <6:3 6:8>");
TS_ASSERT_EQUALS(client->functions[2], "void lambdaCaller()::lambda at 4:2 <4:5 <4:2 4:2> 7:2>");
TS_ASSERT_EQUALS(client->calls.size(), 2);
TS_ASSERT_EQUALS(client->calls[0], "void lambdaCaller() -> void lambdaCaller()::lambda at 4:2 <4:2 7:4>");
TS_ASSERT_EQUALS(client->calls[1], "void lambdaCaller()::lambda at 4:2 -> void func() <6:3 6:8>");
}
void test_cxx_parser_parses_multiple_files()
+5 -4
View File
@@ -310,15 +310,15 @@ public:
{
TestStorage storage;
ParseFunction a(typeUsage("void"), createNameHierarchy("A::isMethod"), parameters("bool"));
ParseFunction b(typeUsage("void"), createNameHierarchy("B::isMethod"), parameters("bool"));
ParseFunction a(typeUsage("void"), createNameHierarchy("A::isMethod(bool)"), parameters("bool"));
ParseFunction b(typeUsage("void"), createNameHierarchy("B::isMethod(bool)"), parameters("bool"));
storage.onMethodParsed(validLocation(9), a, ParserClient::ACCESS_PRIVATE, ParserClient::ABSTRACTION_VIRTUAL, validLocation(4));
storage.onMethodParsed(validLocation(7), b, ParserClient::ACCESS_PRIVATE, ParserClient::ABSTRACTION_NONE, validLocation(3));
storage.onMethodOverrideParsed(validLocation(4), a, b);
TS_ASSERT(storage.getEdgeId(Edge::EDGE_OVERRIDE, "B::isMethod", "A::isMethod") != 0);
TS_ASSERT(storage.getEdgeId(Edge::EDGE_OVERRIDE, "B::isMethod(bool)", "A::isMethod(bool)") != 0);
}
void test_storage_saves_call()
@@ -669,7 +669,8 @@ private:
NameHierarchy nameHierarchy;
for (std::string element: utility::splitToVector(s, "::"))
{
nameHierarchy.push(std::make_shared<NameElement>(element));
std::string signature = (element.find("(") != element.npos ? element : "");
nameHierarchy.push(std::make_shared<NameElement>(element, signature));
}
return nameHierarchy;
}