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

identifiers non-prefixed with absl #49

Closed
Sarcasm opened this issue Nov 22, 2017 · 2 comments
Closed

identifiers non-prefixed with absl #49

Sarcasm opened this issue Nov 22, 2017 · 2 comments
Assignees

Comments

@Sarcasm
Copy link

Sarcasm commented Nov 22, 2017

Looking at the code, I can see some identifiers aren't using the absl namespace.
I'm mostly thinking about some defines/macros, not C++ classes/functions.

For example, there is:

  • LOCKABLE
  • ANNOTATE_CONTIGUOUS_CONTAINER
  • DYNAMIC_ANNOTATIONS_ENABLED

Is it a bug or a feature?

Personally, I would expect ABSL_LOCKABLE instead of LOCKABLE.

@zhangxy988
Copy link
Contributor

They are not prefixed with ABSL_ intentionally. Respectively:

  • LOCKABLE: We use the naming in https://clang.llvm.org/docs/ThreadSafetyAnalysis.html. We don't expect this macro to have any definition conflict with other macros. Let me guess, are you having problem with a enum named LOCKABLE?
  • ANNOTATE_CONTIGUOUS_CONTAINER: These are widely-adopted ASAN macros that we don't want to rename.
  • DYNAMIC_ANNOTATIONS_ENABLED: This is a build switch to enable dynamic annotations. We don't think it's necessary to rename it, because if user has -DDYNAMIC_ANNOTATIONS_ENABLED they probably want -DABSL_DYNAMIC_ANNOTATIONS_ENABLED too.

@zhangxy988 zhangxy988 self-assigned this Nov 22, 2017
@Sarcasm
Copy link
Author

Sarcasm commented Nov 22, 2017

Let me guess, are you having problem with a enum named LOCKABLE?

No :),
I just assumed it was an accepted convention that libraries should not use generic names.
This kind of things works only if one library do it.

Also I don't see any downside to ABSL_LOCKABLE.

Anyway, if it is on purpose, I will close this ticket, I assumed it was there by accident.

Thanks for you answer.

@Sarcasm Sarcasm closed this as completed Nov 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants