Skip to content
This repository has been archived by the owner on Jun 16, 2019. It is now read-only.

Refactoring AST generation #28

Open
surovic opened this issue Apr 23, 2018 · 1 comment
Open

Refactoring AST generation #28

surovic opened this issue Apr 23, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@surovic
Copy link

surovic commented Apr 23, 2018

The state of the AST generation algorithms and data structure codebase could be better and refactored with good programming practices in mind. The incorporation of libclang for it's AST should be considered instead of the custom AST data structure we now have.

The major points to consider when refactoring

  • Classes should adhere to rule of three (or rule of five, or rule of zero).
  • Classes should cooperate flawlessly with STL containers.
  • Use STL containers wherever possible.
  • Avoid explicit dynamic memory allocation (using new) whenever possible. If a custom allocation mechanism is needed, use allocators and STL containers.
  • Use glog's CHECK() and LOG() instead of relying on llvm_unreachable() and LLVM diagnostics.
  • Do not use goto.
@surovic surovic added the enhancement New feature or request label Apr 23, 2018
@surovic surovic added this to the Clang AST Generator milestone Jun 10, 2018
@surovic
Copy link
Author

surovic commented Jun 10, 2018

Update: Using clang AST has been deemed as the way forward and AST generation is being rewritten in dev-clang-ast. Issues related to the rewrite are coupled under this issues milestone.

@surovic surovic self-assigned this Jun 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant