[clang] 003fed8 - [test] Fix test failure in Clang :: Lexer/char-escapes-delimited.c

Matthew Voss via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 16 09:20:45 PDT 2021


Author: Matthew Voss
Date: 2021-09-16T09:20:05-07:00
New Revision: 003fed8269b3f6d2b1618b670fc73d28972999e4

URL: https://github.com/llvm/llvm-project/commit/003fed8269b3f6d2b1618b670fc73d28972999e4
DIFF: https://github.com/llvm/llvm-project/commit/003fed8269b3f6d2b1618b670fc73d28972999e4.diff

LOG: [test] Fix test failure in Clang :: Lexer/char-escapes-delimited.c

Specify the C and C++ standards explicitly for this test. This avoids
failures for drivers that default to older standards.

Differential Revision: https://reviews.llvm.org/D109857

Added: 
    

Modified: 
    clang/test/Lexer/char-escapes-delimited.c

Removed: 
    


################################################################################
diff  --git a/clang/test/Lexer/char-escapes-delimited.c b/clang/test/Lexer/char-escapes-delimited.c
index ad413d1843b06..62465db464bce 100644
--- a/clang/test/Lexer/char-escapes-delimited.c
+++ b/clang/test/Lexer/char-escapes-delimited.c
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s
-// RUN: %clang_cc1 -x c -fsyntax-only -pedantic -verify %s
-// RUN: %clang_cc1 -fwchar-type=short -fno-signed-wchar -fsyntax-only -pedantic -verify %s
-// RUN: %clang_cc1 -x c -fwchar-type=short -fno-signed-wchar -fsyntax-only -pedantic -verify %s
+// RUN: %clang_cc1 -x c++ -std=gnu++11 -fsyntax-only -pedantic -verify %s
+// RUN: %clang_cc1 -x c -std=gnu11 -fsyntax-only -pedantic -verify %s
+// RUN: %clang_cc1 -x c++ -std=gnu++11 -fwchar-type=short -fno-signed-wchar -fsyntax-only -pedantic -verify %s
+// RUN: %clang_cc1 -x c -std=gnu11 -fwchar-type=short -fno-signed-wchar -fsyntax-only -pedantic -verify %s
 
 const char *errors =
     "\u{}"  //expected-error {{delimited escape sequence cannot be empty}}


        


More information about the cfe-commits mailing list