[Expr] Check the language before ignoring Objective C keywords
authorAleksandr Urakov <aleksandr.urakov@jetbrains.com>
Tue, 4 Dec 2018 09:51:29 +0000 (09:51 +0000)
committerAleksandr Urakov <aleksandr.urakov@jetbrains.com>
Tue, 4 Dec 2018 09:51:29 +0000 (09:51 +0000)
commitf335188925b923dc68243f2b2722e5cc5b259e1b
tree7a90e75d9aee7d137ef0e2d4a5d024e8f884db96
parent9d432e0d1412bfdbea7a0d18295d63c7d30d3952
[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
lldb/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py
lldb/packages/Python/lldbsuite/test/expression_command/options/main.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp