diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-06-20 19:23:57 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-06-20 19:23:57 +0000 |
commit | 46762030114916f9eabb40f7c4024ac3ab9fd7ba (patch) | |
tree | 625ea1e5ddeab2e51e56f16f77b885540331d5c3 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 6baeb8805cd69638ae7c5882826c15a1394a3b79 (diff) | |
download | bcm5719-llvm-46762030114916f9eabb40f7c4024ac3ab9fd7ba.tar.gz bcm5719-llvm-46762030114916f9eabb40f7c4024ac3ab9fd7ba.zip |
[C++1z] Implement N3981: Disable trigraphs by default in C++1z mode.
llvm-svn: 211392
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index beaa092c1e5..4647179d6f4 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; |