[lldb-dev] Variable shadowing
Bogdan Hopulele via lldb-dev
lldb-dev at lists.llvm.org
Wed Jun 22 09:43:48 PDT 2016
Hi all,
I'm using lldb 3.9 through the C++ API and I'm trying to determine if a local variable is shadowed or not with no luck.
For the code below:
1. Is there an API call, that I somehow missed, that can tell me that (v = 2) shadows (v = 1)?
2. Can I rely on their order in the SBValueList object?
3. Would you guys think it would be worth adding bool SBValue::IsShadowed() const ?
1 void foo()
2 {
3 int v = 1;
4 {
5 int v = 2;
--> 6 ++v;
7 }
8 }
Thank,
Bogdan
National Instruments Romania S.R.L.
------------------------------------------------------
B-dul 21 Decembrie 1989, nr. 77, A2
Cluj-Napoca 400604, Romania
C.I.F.: RO17961616 | O.R.C.: J12/3337/2005
Telefon: +40 264 406428 | Fax: +40 264 406429
E-mail: office.cluj at ni.com
Web: romania.ni.com
Vanzari si suport tehnic:
Telefon gratuit : 0800 070071
E-mail vanzari: ni.romania at ni.com
E-mail suport tehnic: techsupport at ni.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160622/1b535294/attachment-0001.html>
More information about the lldb-dev
mailing list