summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorFilipe Cabecinhas <me@filcab.net>2015-03-02 18:49:37 +0000
committerFilipe Cabecinhas <me@filcab.net>2015-03-02 18:49:37 +0000
commit5c5c00b7da38d852b727e42f3e83d4a3d94869a0 (patch)
treeed190128f6690b0a980439aa8da8aac03644f6fc /clang
parent3cb611b59efcc4a7186a7b2a7279589618bbb67e (diff)
downloadbcm5719-llvm-5c5c00b7da38d852b727e42f3e83d4a3d94869a0.tar.gz
bcm5719-llvm-5c5c00b7da38d852b727e42f3e83d4a3d94869a0.zip
Add -frtti and -fexceptions to tests that assume these are on.
Summary: We now have targets that don't enable rtti/exceptions by default, and the ASTMatchers tests are assuming that these features are on (e.g: They use dynamic_cast or try). Reviewers: klimek, thakis, djasper Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D7892 llvm-svn: 230984
Diffstat (limited to 'clang')
-rw-r--r--clang/unittests/ASTMatchers/ASTMatchersTest.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/unittests/ASTMatchers/ASTMatchersTest.h b/clang/unittests/ASTMatchers/ASTMatchersTest.h
index a2ab9feee2a..eb4cac5abc5 100644
--- a/clang/unittests/ASTMatchers/ASTMatchersTest.h
+++ b/clang/unittests/ASTMatchers/ASTMatchersTest.h
@@ -73,7 +73,11 @@ testing::AssertionResult matchesConditionally(
std::unique_ptr<FrontendActionFactory> Factory(
newFrontendActionFactory(&Finder));
// Some tests use typeof, which is a gnu extension.
- std::vector<std::string> Args(1, CompileArg);
+ std::vector<std::string> Args;
+ Args.push_back(CompileArg);
+ // Some tests need rtti/exceptions on
+ Args.push_back("-frtti");
+ Args.push_back("-fexceptions");
if (!runToolOnCodeWithArgs(Factory->create(), Code, Args, "input.cc",
VirtualMappedFiles)) {
return testing::AssertionFailure() << "Parsing error in \"" << Code << "\"";
OpenPOWER on IntegriCloud