From 46762030114916f9eabb40f7c4024ac3ab9fd7ba Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Fri, 20 Jun 2014 19:23:57 +0000 Subject: [C++1z] Implement N3981: Disable trigraphs by default in C++1z mode. llvm-svn: 211392 --- clang/lib/Frontend/CompilerInvocation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index beaa092..4647179 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -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; -- cgit v1.1