[C++1z] Implement N3981: Disable trigraphs by default in C++1z mode.

llvm-svn: 211392
This commit is contained in:
Richard Smith
2014-06-20 19:23:57 +00:00
parent 6baeb8805c
commit 4676203011
2 changed files with 11 additions and 1 deletions

View File

@@ -1167,7 +1167,8 @@ void CompilerInvocation::setLangDefaults(LangOptions &Opts, InputKind IK,
// Mimicing gcc's behavior, trigraphs are only enabled if -trigraphs
// is specified, or -std is set to a conforming mode.
Opts.Trigraphs = !Opts.GNUMode;
// Trigraphs are disabled by default in c++1z onwards.
Opts.Trigraphs = !Opts.GNUMode && !Opts.CPlusPlus1z;
Opts.DollarIdents = !Opts.AsmPreprocessor;