teak-llvm/lldb/packages/Python/lldbsuite/test/expression_command/options/main.cpp
Aleksandr Urakov f335188925 [Expr] Check the language before ignoring Objective C keywords
Summary:
This patch adds the check of the language before ignoring names like `id` or
`Class`, which are reserved in Objective C, but are allowed in C++. It is needed
to make it possible to evaluate expressions in a C++ program containing names
like `id` or `Class`.

Reviewers: jingham, zturner, labath, clayborg

Reviewed By: jingham, clayborg

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D54843

llvm-svn: 348240
2018-12-04 09:51:29 +00:00

18 lines
248 B
C++

extern "C" int foo(void);
static int static_value = 0;
static int id = 1234;
int
bar()
{
static_value++;
id++;
return static_value + id;
}
int main (int argc, char const *argv[])
{
bar(); // breakpoint_in_main
return foo();
}