summaryrefslogtreecommitdiffstats
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-20 16:54:55 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-24 18:18:54 (GMT)
commit3bb8bd6662baf02caa6618fc271b5daaebfbab63 (patch)
tree34a4aafe84d38e17023937b913aee43ffefc3734 /test/CMakeLists.txt
parent25ff73764f1a54a0c3689df949f2d7e9ab41a014 (diff)
downloadCastXML-3bb8bd6662baf02caa6618fc271b5daaebfbab63.zip
CastXML-3bb8bd6662baf02caa6618fc271b5daaebfbab63.tar.gz
CastXML-3bb8bd6662baf02caa6618fc271b5daaebfbab63.tar.bz2
Output: Skip implicit members that cannot be compiled
Implement the HandleTagDeclDefinition method in our ASTConsumer. Clang calls this method during parsing on completion of each class definition. This gives us a chance to modify class definitions. Teach HandleTagDeclDefinition to add the implicit member declarations. For each implicit member, ask Clang to try instantiating its definition to see if a call to the member will actually work. Suppress errors during this check using a clang::Sema::SFINAETrap and simply mark the declaration as invalid if there were errors. Add test cases for: * implicit members that cannot be used due to access, const data members, or reference data members. * a POD array data member since Clang uses special logic when creating implicit members that copy the data. * a mutable data member since Clang adds implicit member declarations itself (via clang::Sema::AddImplicitlyDeclaredMembersToClass), but we still need to try defining them. * a class that uses its implicit members so they are already defined.
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r--test/CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 0441ce7..4749b58 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -86,6 +86,12 @@ castxml_test_gccxml(Class-base-typedef)
castxml_test_gccxml(Class-bases)
castxml_test_gccxml(Class-forward)
castxml_test_gccxml(Class-friends)
+castxml_test_gccxml(Class-implicit-member-access)
+castxml_test_gccxml(Class-implicit-member-access-mutable)
+castxml_test_gccxml(Class-implicit-member-array)
+castxml_test_gccxml(Class-implicit-member-const)
+castxml_test_gccxml(Class-implicit-member-reference)
+castxml_test_gccxml(Class-implicit-members)
castxml_test_gccxml(Class-incomplete)
castxml_test_gccxml(Class-incomplete-twice)
castxml_test_gccxml(Class-member-template)