diff options
author | Nico Weber <nicolasweber@gmx.de> | 2014-12-23 22:32:37 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2014-12-23 22:32:37 +0000 |
commit | 007215044b48de0ebf32a44c77326c9634b35bdc (patch) | |
tree | 03958c6a76a21f2c6d634bcbba5a6db0ce14bf89 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 9fdeb37bd346089488c5fe77a7edf16ee2f34cb1 (diff) | |
download | bcm5719-llvm-007215044b48de0ebf32a44c77326c9634b35bdc.tar.gz bcm5719-llvm-007215044b48de0ebf32a44c77326c9634b35bdc.zip |
Add driver flags -ftrigraphs, -fno-trigraphs.
-trigraphs is now an alias for -ftrigraphs. -fno-trigraphs makes it possible
to explicitly disable trigraphs, which couldn't be done before.
clang -std=c++11 -fno-trigraphs
now builds without GNU extensions, but with trigraphs disabled. Previously,
trigraphs were only disabled in GNU modes or with -std=c++1z.
Make the new -f flags the cc1 interface too. This requires changing -trigraphs
to -ftrigraphs in a few cc1 tests.
Related to PR21974.
llvm-svn: 224790
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index f44a4fb8ae7..8d484a5479a 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1440,8 +1440,8 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, // is specified, or -std is set to a conforming mode. // Trigraphs are disabled by default in c++1z onwards. Opts.Trigraphs = !Opts.GNUMode && !Opts.MSVCCompat && !Opts.CPlusPlus1z; - if (Args.hasArg(OPT_trigraphs)) - Opts.Trigraphs = 1; + Opts.Trigraphs = + Args.hasFlag(OPT_ftrigraphs, OPT_fno_trigraphs, Opts.Trigraphs); Opts.DollarIdents = Args.hasFlag(OPT_fdollars_in_identifiers, OPT_fno_dollars_in_identifiers, |