summaryrefslogtreecommitdiffstats
path: root/clang/tools/clang-import-test
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2018-08-20 16:20:01 +0000
committerRaphael Isemann <teemperor@gmail.com>2018-08-20 16:20:01 +0000
commitc705bb840172ce32d90e1b11b887726e338b9df7 (patch)
treec0a3b091f64cda25bea3d17aac8c8c3f202ae40d /clang/tools/clang-import-test
parent7b1a7bd5bab1dfc1f411daab4761d2842f564fd6 (diff)
downloadbcm5719-llvm-c705bb840172ce32d90e1b11b887726e338b9df7.tar.gz
bcm5719-llvm-c705bb840172ce32d90e1b11b887726e338b9df7.zip
[ASTImporter] Add test for C++ casts and fix broken const_cast importing.
Summary: The ASTImporter does currently not handle const_casts. This patch adds the missing const_cast importer code and the test case that discovered this. Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: a_sidorin, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D50932 llvm-svn: 340182
Diffstat (limited to 'clang/tools/clang-import-test')
-rw-r--r--clang/tools/clang-import-test/clang-import-test.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/tools/clang-import-test/clang-import-test.cpp b/clang/tools/clang-import-test/clang-import-test.cpp
index 106f3d1d150..ff14f62574e 100644
--- a/clang/tools/clang-import-test/clang-import-test.cpp
+++ b/clang/tools/clang-import-test/clang-import-test.cpp
@@ -194,6 +194,8 @@ std::unique_ptr<CompilerInstance> BuildCompilerInstance() {
Inv->getLangOpts()->ThreadsafeStatics = false;
Inv->getLangOpts()->AccessControl = false;
Inv->getLangOpts()->DollarIdents = true;
+ // Needed for testing dynamic_cast.
+ Inv->getLangOpts()->RTTI = true;
Inv->getCodeGenOpts().setDebugInfo(codegenoptions::FullDebugInfo);
Inv->getTargetOpts().Triple = llvm::sys::getDefaultTargetTriple();
OpenPOWER on IntegriCloud