From f335188925b923dc68243f2b2722e5cc5b259e1b Mon Sep 17 00:00:00 2001 From: Aleksandr Urakov Date: Tue, 4 Dec 2018 09:51:29 +0000 Subject: [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 --- .../Python/lldbsuite/test/expression_command/options/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/options/main.cpp') diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/options/main.cpp b/lldb/packages/Python/lldbsuite/test/expression_command/options/main.cpp index ecd9a90f662..0d30c79bd22 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/options/main.cpp +++ b/lldb/packages/Python/lldbsuite/test/expression_command/options/main.cpp @@ -1,11 +1,13 @@ extern "C" int foo(void); static int static_value = 0; +static int id = 1234; int bar() { static_value++; - return static_value; + id++; + return static_value + id; } int main (int argc, char const *argv[]) -- cgit v1.2.3