[Lldb-commits] [PATCH] D120836: [LLDB] Remove cases of using namespace llvm:: from header file

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 2 23:07:05 PST 2022


JDevlieghere added inline comments.


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp:19
 using namespace lldb;
+using namespace dwarf;
 
----------------
shafik wrote:
> JDevlieghere wrote:
> > Wouldn't it be more consistent to use `lldb_private::dwarf` everywhere? 
> Yeah, I was trying to match the style of  how it was done for minidump, see `source/Plugins/Process/minidump/MinidumpParser.cpp`.
> 
> Since we need access to both namespaces but in files that did already have `using namespace lldb_private;` I just used the less verbose version.
> 
> I can see arguments for just being verbose everywhere.
Maybe it's just preference? Curious to hear from @labath why he did it that way. Personally I prefer the slightly more verbose one because it's self contained. 


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:35
+using namespace dwarf;
 using namespace std;
 extern int g_verbose;
----------------
shafik wrote:
> JDevlieghere wrote:
> > [[ https://llvm.org/docs/CodingStandards.html#do-not-use-using-namespace-std | Oh no... ]]
> Yeah I noticed that was going to put that on a list of things to do, didn't feel right mixing that in here as well.
Totally!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120836/new/

https://reviews.llvm.org/D120836



More information about the lldb-commits mailing list