logic: implemented skipping implicit code in CxxForRangeStatements

This commit is contained in:
malte_langkabel
2017-03-06 16:41:10 +01:00
parent bcc71d630f
commit 235a224f12
7 changed files with 97 additions and 3 deletions
+16
View File
@@ -1272,6 +1272,22 @@ public:
TS_ASSERT(utility::containsElement<std::string>(client->builtinTypes, "bool"));
}
void test_cxx_parser_finds_implicit_copy_constructor()
{
std::shared_ptr<TestParserClient> client = parseCode(
"class TestClass {}\n"
"void foo()\n"
"{\n"
" TestClass a;\n"
" TestClass b(a);\n"
"}\n"
);
TS_ASSERT(utility::containsElement<std::string>(client->methods, "public void TestClass::TestClass() <1:7 <1:7 1:15> 1:7>"));
TS_ASSERT(utility::containsElement<std::string>(client->methods, "public void TestClass::TestClass(const TestClass &) <1:7 <1:7 1:15> 1:7>"));
TS_ASSERT(utility::containsElement<std::string>(client->methods, "public void TestClass::TestClass(TestClass &) <1:7 1:15>"));
}
///////////////////////////////////////////////////////////////////////////////
// test finding usages of symbols