[llvm] [NFC][LLVM] Use namespace `Intrinsic` in `Intrinsics.cpp` (PR #114822)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 08:12:30 PST 2024


jurahul wrote:

Thanks for reverting. What is surprising to me is that I'd have though the effect of "using namespace Intrinsic" in the Intrinsic.cpp file would be on code after that statement, but it looks like from the build log that code before that is affected, which seems counterintuitive. 

https://en.cppreference.com/w/cpp/language/namespace

[using-directive](https://en.cppreference.com/w/cpp/language/namespace#Using-directives): From the point of view of unqualified [name lookup](https://en.cppreference.com/w/cpp/language/lookup) of any name after a using-directive and until the end of the scope in which it appears, every name from ns-name is visible as if it were declared in the nearest enclosing namespace which contains both the using-directive and ns-name.


https://github.com/llvm/llvm-project/pull/114822


More information about the llvm-commits mailing list