Creating a C++ library that analyzes a C++ program for potential errors and highlights them. This library can be thought of as a static code analysis tool. Here’s a basic outline to get you started: This is just the initial phase for my project I would be implementing a lot in future. Currently working on Key feature pt 1 and pt2.
- Syntax Checking: Parse the source code to check for syntax errors.
- Semantic Analysis: Ensure the code makes sense in the context of C++ semantics.
- Common Error Detection:
- Memory leaks.
- Null pointer dereferencing.
- Uninitialized variables.
- Unreachable code.
- Type mismatches.
- Buffer overflows.
- Code Highlighting: Highlight the part of the code where the error occurs.
- Thinking to implement a feature to provide the time complexity of the program.