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
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 << "\"";