[cfe-commits] r167359 - /cfe/trunk/unittests/Lex/PPCallbacksTest.cpp

Benjamin Kramer benny.kra at googlemail.com
Sat Nov 3 13:58:26 PDT 2012


Author: d0k
Date: Sat Nov  3 15:58:26 2012
New Revision: 167359

URL: http://llvm.org/viewvc/llvm-project?rev=167359&view=rev
Log:
Escape trigraphs in unittest.

Modified:
    cfe/trunk/unittests/Lex/PPCallbacksTest.cpp

Modified: cfe/trunk/unittests/Lex/PPCallbacksTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Lex/PPCallbacksTest.cpp?rev=167359&r1=167358&r2=167359&view=diff
==============================================================================
--- cfe/trunk/unittests/Lex/PPCallbacksTest.cpp (original)
+++ cfe/trunk/unittests/Lex/PPCallbacksTest.cpp Sat Nov  3 15:58:26 2012
@@ -222,27 +222,25 @@
   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





More information about the cfe-commits mailing list