From: Nuno Lopes Date: Fri, 16 Oct 2009 14:28:06 +0000 (+0000) Subject: fix -ansi in c++: it means -std=c++98 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=528365d3189d27f3a90a4012baaa8b2814e0a231;p=clang fix -ansi in c++: it means -std=c++98 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84254 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 2a9ff8f676..e638d8771c 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -769,7 +769,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // option. if (Arg *Std = Args.getLastArg(options::OPT_std_EQ, options::OPT_ansi)) { if (Std->getOption().matches(options::OPT_ansi)) - CmdArgs.push_back("-std=c89"); + if (types::isCXX(InputType)) + CmdArgs.push_back("-std=c++98"); + else + CmdArgs.push_back("-std=c89"); else Std->render(Args, CmdArgs);