diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-11-03 20:58:26 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-11-03 20:58:26 +0000 |
commit | 7164095ea1c804740e00d54d05a7e8d1f876c674 (patch) | |
tree | 0a1eff4b63074f7868d0bb4ccf6c67183b00d27c /unittests/Lex/PPCallbacksTest.cpp | |
parent | 5a24980d059cd9fbe8375a4c549313101ad20698 (diff) |
Escape trigraphs in unittest.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167359 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Lex/PPCallbacksTest.cpp')
-rw-r--r-- | unittests/Lex/PPCallbacksTest.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/unittests/Lex/PPCallbacksTest.cpp b/unittests/Lex/PPCallbacksTest.cpp index ccb5f50a85..6e7efa980c 100644 --- a/unittests/Lex/PPCallbacksTest.cpp +++ b/unittests/Lex/PPCallbacksTest.cpp @@ -222,27 +222,25 @@ TEST_F(PPCallbacksTest, ConcatenatedMacroArgument) { ASSERT_EQ("<angled.h>", GetSourceString(Range)); } -#pragma clang diagnostic ignored "-Wtrigraphs" - TEST_F(PPCallbacksTest, TrigraphFilename) { const char* Source = - "#include \"tri??-graph.h\"\n"; + "#include \"tri\?\?-graph.h\"\n"; CharSourceRange Range = InclusionDirectiveFilenameRange(Source, "/tri~graph.h", false); - ASSERT_EQ("\"tri??-graph.h\"", GetSourceString(Range)); + ASSERT_EQ("\"tri\?\?-graph.h\"", GetSourceString(Range)); } TEST_F(PPCallbacksTest, TrigraphInMacro) { const char* Source = - "#define MACRO_TRIGRAPH \"tri??-graph.h\"\n" + "#define MACRO_TRIGRAPH \"tri\?\?-graph.h\"\n" "#include MACRO_TRIGRAPH\n"; CharSourceRange Range = InclusionDirectiveFilenameRange(Source, "/tri~graph.h", false); - ASSERT_EQ("\"tri??-graph.h\"", GetSourceString(Range)); + ASSERT_EQ("\"tri\?\?-graph.h\"", GetSourceString(Range)); } } // anonoymous namespace |