Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance >check #71

Open
13 tasks
GregUtas opened this issue Nov 11, 2017 · 0 comments
Open
13 tasks

Enhance >check #71

GregUtas opened this issue Nov 11, 2017 · 0 comments

Comments

@GregUtas
Copy link
Owner

GregUtas commented Nov 11, 2017

Extend the Warning enum to support any of the following:

  • use of typedef (for conversion to using type alias)
  • data member has set function but class writes directly to the member
  • packing an enum into a field that cannot hold +/- the largest absolute value of an enumerator (need to resolve ClassData.width_ to a constant)
  • assigning the result of new to a stack or member pointer instead of a smart pointer
  • redefining an inherited default argument
  • #include only required because of inlines in header (would need to modify GetUsages to track symbols that only appeared in inlines)
  • function returns a value that is never used
  • byte-sized non-char field that is displayed as a character instead of numerically (might be detected by checking for invocations of ostream::operator<< in Function.WasCalled)
  • member omitted by Display function
  • default argument specified by definition rather than declaration (default needs to be seen by the compiler at the point of usage, so the definition would probably have to be in a header to have any effect)

And the following, which are only for formatting:

  • using statement not sorted in alphabetical order
  • single rule (//---...) not used between function definitions in same class
  • double rule (//===...) not used between function definitions in different classes
@GregUtas GregUtas changed the title Add warnings for C++ checker Add warnings for >check Nov 12, 2017
@GregUtas GregUtas changed the title Add warnings for >check Enhance checker Nov 12, 2017
@GregUtas GregUtas changed the title Enhance checker Enhance >check Nov 16, 2017
GregUtas added a commit that referenced this issue Jan 12, 2018
@GregUtas GregUtas mentioned this issue Feb 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant