This is an archive of the discontinued LLVM Phabricator instance.

[libc] Wrap unittests in __llvm_libc namespace. NFC
Needs ReviewPublic

Authored by PaulkaToast on Apr 26 2020, 4:24 PM.

Details

Summary

Some of our tests were wrapped in __llvm_libc namespace, while other were not. This patch makes them consistent and prevent upcoming test CalleeNamespaceCheck from triggering on things like memcpy_test helper functions.

Diff Detail

Event Timeline

PaulkaToast created this revision.Apr 26 2020, 4:24 PM

If the goal is to not need to explicitly use the __llvm_libc:: prefix in our tests we could change the TEST macro to put the class it makes in __llvm_libc instead of needing to remember to explicitly put our tests in __llvm_libc. Granted it isn't difficult to remember to put new tests in the namespace but I don't think there is any clear advantage to requiring it either.

What is the problem if we do not wrap the tests in __llvm_libc namespace?