[PATCH] Add -frtti and -fexceptions to tests that assume these are on.

Filipe Cabecinhas filcab+llvm.phabricator at gmail.com
Mon Mar 2 10:52:02 PST 2015


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7892

Files:
  cfe/trunk/unittests/ASTMatchers/ASTMatchersTest.h

Index: cfe/trunk/unittests/ASTMatchers/ASTMatchersTest.h
===================================================================
--- cfe/trunk/unittests/ASTMatchers/ASTMatchersTest.h
+++ cfe/trunk/unittests/ASTMatchers/ASTMatchersTest.h
@@ -73,7 +73,11 @@
   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 << "\"";

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7892.21017.patch
Type: text/x-patch
Size: 828 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150302/a2fa099c/attachment.bin>


More information about the cfe-commits mailing list