[Lldb-commits] [PATCH] D38153: Inhibit global lookups for symbols in the IR dynamic checks

Zachary Turner via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 21 14:11:51 PDT 2017


zturner added inline comments.


================
Comment at: source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp:635-652
   const ConstString name(context.m_decl_name.getAsString().c_str());
 
   const char *name_unique_cstr = name.GetCString();
 
   static ConstString id_name("id");
   static ConstString Class_name("Class");
 
----------------
I might be missing something here, but how about:

```
std::string name = context.m_decl_name.getAsString();
if (name.empty() || name == "id" || name == "Class")
  return;
if (name.startswith("$") || name.startswith("_$"))
  return;
```

5 lines instead of ~20.


Repository:
  rL LLVM

https://reviews.llvm.org/D38153





More information about the lldb-commits mailing list