Files
clang-p2996/lldb/test/API/lang/cpp/nested-template/TestNestedTemplate.py
Arthur Eubanks 5dd7c16c3d [lldb] Don't create Clang AST nodes in GetDIEClassTemplateParams
Otherwise we may be inserting a decl into a DeclContext that's not fully defined yet.

This simplifies/removes some clang AST node creation code. Instead, use
clang::printTemplateArgumentList().

Reviewed By: Michael137

Differential Revision: https://reviews.llvm.org/D142413
2023-01-24 19:13:19 -08:00

25 lines
916 B
Python

"""
Test that a nested template parameter works with simple template names.
"""
import lldb
import lldbsuite.test.lldbutil as lldbutil
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
class NestedTemplateTestCase(TestBase):
def do_test(self, debug_flags):
self.build(dictionary=debug_flags)
self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
self.expect("image lookup -A -t 'Inner<int>'", DATA_TYPES_DISPLAYED_CORRECTLY, substrs=["1 match found"])
@skipIf(compiler=no_match("clang"))
@skipIf(compiler_version=["<", "15.0"])
def test_simple_template_names(self):
self.do_test(dict(TEST_CFLAGS_EXTRAS="-gsimple-template-names"))
@skipIf(compiler=no_match("clang"))
@skipIf(compiler_version=["<", "15.0"])
def test_no_simple_template_names(self):
self.do_test(dict(TEST_CFLAGS_EXTRAS="-gno-simple-template-names"))