forked from OSchip/llvm-project
Revert "[lldb] Enable C++14 when evaluating expressions in a C++14 frame"
This reverts commit 5f88f39ab8
. It broke these
three tests on the Window bot:
lldb-api :: commands/expression/completion/TestExprCompletion.py
lldb-api :: lang/cpp/scope/TestCppScope.py
lldb-api :: lang/cpp/standards/cpp11/TestCPP11Standard.py
This commit is contained in:
parent
a4b8ee6422
commit
8cb7574541
|
@ -491,11 +491,9 @@ ClangExpressionParser::ClangExpressionParser(
|
|||
// be re-evaluated in the future.
|
||||
lang_opts.CPlusPlus11 = true;
|
||||
break;
|
||||
case lldb::eLanguageTypeC_plus_plus_14:
|
||||
lang_opts.CPlusPlus14 = true;
|
||||
LLVM_FALLTHROUGH;
|
||||
case lldb::eLanguageTypeC_plus_plus:
|
||||
case lldb::eLanguageTypeC_plus_plus_11:
|
||||
case lldb::eLanguageTypeC_plus_plus_14:
|
||||
lang_opts.CPlusPlus11 = true;
|
||||
m_compiler->getHeaderSearchOpts().UseLibcxx = true;
|
||||
LLVM_FALLTHROUGH;
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
CXX_SOURCES := main.cpp
|
||||
CXXFLAGS_EXTRAS := -std=c++11
|
||||
|
||||
include Makefile.rules
|
|
@ -1,19 +0,0 @@
|
|||
import lldb
|
||||
from lldbsuite.test.decorators import *
|
||||
from lldbsuite.test.lldbtest import *
|
||||
from lldbsuite.test import lldbutil
|
||||
|
||||
class TestCase(TestBase):
|
||||
|
||||
mydir = TestBase.compute_mydir(__file__)
|
||||
|
||||
def test(self):
|
||||
self.build()
|
||||
lldbutil.run_to_source_breakpoint(self, "// break here", lldb.SBFileSpec("main.cpp"))
|
||||
|
||||
# Run an expression that is valid in C++11 (as it uses nullptr).
|
||||
self.expect_expr("nullptr == nullptr", result_type="bool", result_value="true")
|
||||
|
||||
# Run a expression that is not valid in C++11 (as it uses polymorphic
|
||||
# lambdas from C++14).
|
||||
self.expect("expr [](auto x) { return x; }(1)", error=True, substrs=["'auto' not allowed in lambda parameter"])
|
|
@ -1,3 +0,0 @@
|
|||
int main() {
|
||||
return 0; // break here
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
CXX_SOURCES := main.cpp
|
||||
CXXFLAGS_EXTRAS := -std=c++14
|
||||
|
||||
include Makefile.rules
|
|
@ -1,19 +0,0 @@
|
|||
import lldb
|
||||
from lldbsuite.test.decorators import *
|
||||
from lldbsuite.test.lldbtest import *
|
||||
from lldbsuite.test import lldbutil
|
||||
|
||||
class TestCase(TestBase):
|
||||
|
||||
mydir = TestBase.compute_mydir(__file__)
|
||||
|
||||
def test(self):
|
||||
self.build()
|
||||
lldbutil.run_to_source_breakpoint(self, "// break here", lldb.SBFileSpec("main.cpp"))
|
||||
|
||||
# Run an expression that is valid in C++11 (as it uses nullptr).
|
||||
self.expect_expr("nullptr == nullptr", result_type="bool", result_value="true")
|
||||
|
||||
# Run a expression that is only valid in C++14 that (as it uses
|
||||
# polymorphic lambdas).
|
||||
self.expect_expr("[](auto x) { return x; }(1)", result_type="int", result_value="1")
|
|
@ -1,3 +0,0 @@
|
|||
int main() {
|
||||
return 0; // break here
|
||||
}
|
Loading…
Reference in New Issue