diff options
author | Brad King <brad.king@kitware.com> | 2014-04-10 13:00:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-04-10 13:11:05 (GMT) |
commit | 80d1be2da7aea241318130e4c49aebfe54377e29 (patch) | |
tree | 19bf27d537f9b909a824f8717eb013ac95309f31 /test/CMakeLists.txt | |
parent | 721e248bcad717e306133990bf9ac1b64861dbe7 (diff) | |
download | CastXML-80d1be2da7aea241318130e4c49aebfe54377e29.zip CastXML-80d1be2da7aea241318130e4c49aebfe54377e29.tar.gz CastXML-80d1be2da7aea241318130e4c49aebfe54377e29.tar.bz2 |
castxml: Support -std=c++11 with --castxml-gccxml
Parsing standard library headers in Visual Studio 11 and above requires
Clang to use -std=c++11 because the headers use C++11 constructs. While
gccxml output format does not support these constructs, it is still
useful to be able to output interfaces from C++98 project code while
tolerating C++11 constructs in system headers.
Drop the rejection of -std=c++11 and --castxml-gccxml together. Teach
our ASTVisitor::AddDumpNode method to skip deleted member functions,
implicit move constructors, and implicit move assignment operators.
This should avoid encountering any C++11 constructs that are not written
explicitly in the translation unit.
Extend the test suite to run all gccxml output format tests in both
-std=c++98 and -std=c++11 mode to verify the behavior of the two modes
is as close as possible. Tweak the Class-implicit-members expected
output to tolerate the empty throw specification missing in C++11 mode.
Add a RValueReferenceType test to verify that the gccxml-format output
contains an Unimplemented element for the rvalue-reference type.
Diffstat (limited to 'test/CMakeLists.txt')
-rw-r--r-- | test/CMakeLists.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 448e801..05ffc70 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -53,20 +53,30 @@ macro(castxml_test_gccxml_cxx98 test) castxml_test_gccxml_common(gccxml cxx c++98 ${test}) endmacro() +macro(castxml_test_gccxml_cxx11 test) + castxml_test_gccxml_common(gccxml cxx c++11 ${test}) +endmacro() + macro(castxml_test_gccxml_broken_cxx98 test) castxml_test_gccxml_common(gccxml.broken cxx c++98 ${test}) endmacro() +macro(castxml_test_gccxml_broken_cxx11 test) + castxml_test_gccxml_common(gccxml.broken cxx c++11 ${test}) +endmacro() + macro(castxml_test_gccxml_c test) castxml_test_gccxml_c89(${test}) endmacro() macro(castxml_test_gccxml test) castxml_test_gccxml_cxx98(${test}) + castxml_test_gccxml_cxx11(${test}) endmacro() macro(castxml_test_gccxml_broken test) castxml_test_gccxml_broken_cxx98(${test}) + castxml_test_gccxml_broken_cxx11(${test}) endmacro() set(input ${CMAKE_CURRENT_LIST_DIR}/input) @@ -153,6 +163,7 @@ castxml_test_gccxml(OperatorFunction) castxml_test_gccxml(OperatorMethod) castxml_test_gccxml(PointerType) castxml_test_gccxml(ReferenceType) +castxml_test_gccxml(RValueReferenceType) castxml_test_gccxml(Typedef-paren) castxml_test_gccxml(Typedef-to-Class-template) castxml_test_gccxml(Typedef-to-Enumeration) |