summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2015-04-24 09:55:20 +0300
committerOrgad Shaneh <orgads@gmail.com>2015-05-15 14:21:45 +0000
commit9b30795c02ac659606304f1a101279cd66af5c07 (patch)
tree67a9d988af34cb2f3701302d89a330a07350e12c /tests
parentee37f60bffb14fc20abe63b812dc3b8f20974fe1 (diff)
downloadqt-creator-9b30795c02ac659606304f1a101279cd66af5c07.tar.gz
C++: Fix lookup for instantiation by class object
Task-number: QTCREATORBUG-14352 Change-Id: I2ce4bc1d0dba2414afe050e80607b581686081a9 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/cplusplus/checksymbols/tst_checksymbols.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/auto/cplusplus/checksymbols/tst_checksymbols.cpp b/tests/auto/cplusplus/checksymbols/tst_checksymbols.cpp
index eb88edfb9f..c584dab0fd 100644
--- a/tests/auto/cplusplus/checksymbols/tst_checksymbols.cpp
+++ b/tests/auto/cplusplus/checksymbols/tst_checksymbols.cpp
@@ -118,6 +118,7 @@ public:
// Processs source
const Document::Ptr document = createDocument(filePath, source);
+ QVERIFY(document);
Snapshot snapshot;
snapshot.insert(document);
@@ -1202,7 +1203,6 @@ void tst_CheckSymbols::findField()
source[position] = ' ';
BaseTestCase tc(source);
Use use = tc.findUse(line, column);
- QEXPECT_FAIL("pointer_indirect_specialization_double_indirection", "QTCREATORBUG-14141", Abort);
QEXPECT_FAIL("pointer_indirect_specialization_double_indirection_with_base", "QTCREATORBUG-14141", Abort);
QEXPECT_FAIL("recursive_instantiation_of_template_type", "QTCREATORBUG-14237", Abort);
QVERIFY(use.isValid());
@@ -1281,6 +1281,26 @@ void tst_CheckSymbols::findField_data()
"}\n"
);
+ QTest::newRow("instantiation_of_indirect_typedef") << _(
+ "template<typename _Tp>\n"
+ "struct Indirect { _Tp t; };\n"
+ "\n"
+ "template<typename T>\n"
+ "struct Temp\n"
+ "{\n"
+ " typedef T MyT;\n"
+ " typedef Indirect<MyT> indirect;\n"
+ "};\n"
+ "\n"
+ "struct Foo { int bar; };\n"
+ "\n"
+ "void func()\n"
+ "{\n"
+ " Temp<Foo>::indirect i;\n"
+ " i.t.@bar;\n"
+ "}\n"
+ );
+
QTest::newRow("pointer_indirect_specialization_double_indirection") << _(
"template<typename _Tp>\n"
"struct Traits { };\n"