logic: c language support

* re-added gui for c project setup
* ASTVisitor now visits RecordDecls instead of CXXRecordDecls
* prevented endless recursion when parsing struct that is defined in functions signature.
This commit is contained in:
malte_langkabel
2015-12-18 16:27:49 +01:00
parent 5c0493267c
commit bed0f8f157
4 changed files with 39 additions and 31 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ public:
virtual bool VisitStmt(const clang::Stmt* statement); // avoid visiting
virtual bool VisitTypedefDecl(clang::TypedefDecl* declaration); // typedefs
virtual bool VisitCXXRecordDecl(clang::CXXRecordDecl* declaration); // structs, classes and inheritance
virtual bool VisitRecordDecl(clang::RecordDecl* declaration);
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
@@ -86,7 +86,7 @@ private:
ParseLocation getParseLocationForTokensInRange(const clang::SourceRange& range) const;
ParseLocation getParseLocationForNamedDecl(const clang::NamedDecl* decl) const;
ParseLocation getParseLocationOfFunctionBody(const clang::FunctionDecl* decl) const;
ParseLocation getParseLocationOfRecordBody(clang::CXXRecordDecl* decl) const;
ParseLocation getParseLocationOfRecordBody(clang::RecordDecl* decl) const;
ParseTypeUsage getParseTypeUsage(const clang::TypeLoc& typeLoc, const clang::QualType& type) const;
ParseTypeUsage getParseTypeUsage(const clang::TypeLoc& typeLoc, const std::shared_ptr<DataType> type) const;