[ExpressionParser] Fix evaluation failures due to mismatch in C++ versions.
authorDavide Italiano <davide@freebsd.org>
Fri, 15 Dec 2017 00:50:43 +0000 (00:50 +0000)
committerDavide Italiano <davide@freebsd.org>
Fri, 15 Dec 2017 00:50:43 +0000 (00:50 +0000)
commit89419f88bcff105bca261f37a8ae0fda02575ba6
tree598fd3b55a68e7c81d3ebc9468bbeb9605068658
parenta43c16157d2c7217a71a0fd558b1070a8d356f64
[ExpressionParser] Fix evaluation failures due to mismatch in C++ versions.

Clang recently switched to C++14 (with GNU extensions) as the default
dialect, but LLDB didn't catch up. This causes failures as LLDB still
evaluates ObjectiveC expressions as Objective C++ using C++98 as standard.

There are things not available in C++98, including, e.g. nullptr.
In some cases Objective-C `nil` is defined as `nullptr` so this causes
an evaluation failure. Switch the default to overcome this issue
(actually, currently lldb evaluates both C++11 and C++14 as C++11,
but that seems a larger change and definitely could be re-evaluated
in the future).

No test as this is currently failing on the LLDB bots after the clang
switch (so, de facto, there's a test already for it).

This is a recommit, with a thinko fixed (the code was previously
placed incorrectly).

<rdar://problem/36011995>

llvm-svn: 320778
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp