]> granicus.if.org Git - clang/commitdiff
Add -frtti and -fexceptions to tests that assume these are on.
authorFilipe Cabecinhas <me@filcab.net>
Mon, 2 Mar 2015 18:49:37 +0000 (18:49 +0000)
committerFilipe Cabecinhas <me@filcab.net>
Mon, 2 Mar 2015 18:49:37 +0000 (18:49 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230984 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/ASTMatchers/ASTMatchersTest.h

index a2ab9feee2a27f372417f299b7ede62661642694..eb4cac5abc57847127b5d4f1c3c909297cdf3a23 100644 (file)
@@ -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 << "\"";