Skip to content

coding guidelines: prefer using instead of typedef #3270

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

Merged
merged 1 commit into from
Nov 5, 2018

Conversation

kroening
Copy link
Member

@kroening kroening commented Nov 5, 2018

Functionally equivalent, but more modern. This is also what Google's C++
Style Guide says.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

Functionally equivalent, but more modern.  This is also what Google's C++
Style Guide says.
Copy link
Collaborator

@tautschnig tautschnig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am ok with this as long as we introduce it gradually rather than doing some rewrite of the codebase.

Copy link
Contributor

@chrisr-diffblue chrisr-diffblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy with the update to the coding standard, and also echo Michaels comment that hopefully this won't encourage someone to do a giant re-rewrite PR :-)
Question: Should we update any clang-format/lint configs to match?

@tautschnig
Copy link
Collaborator

cpplint has a CheckNamespaceOrUsing rule, but it doesn't seem to be triggering much (we already have instances of using in the code base).

@tautschnig tautschnig merged commit 3a393e0 into develop Nov 5, 2018
@tautschnig tautschnig deleted the using-vs-typedef branch November 5, 2018 15:41
Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️
Passed Diffblue compatibility checks (cbmc commit: f2e8918).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/90286010

thk123 pushed a commit to thk123/cbmc that referenced this pull request Nov 21, 2018
This was encouraged in diffblue#3270 but the linter was not updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants