mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-01 01:31:26 +00:00
e0ac46e69d
This reverts commit d618f1c3b1
.
This commit wasn't reviewed ahead of time and significant concerns were
raised immediately after it landed. According to our developer policy
this warrants immediate revert of the commit.
https://llvm.org/docs/DeveloperPolicy.html#patch-reversion-policy
Differential Revision: https://reviews.llvm.org/D155509
46 lines
1.1 KiB
C
46 lines
1.1 KiB
C
/*
|
|
RUN: %clang_cc1 -E -ftrigraphs %s | grep bar
|
|
RUN: %clang_cc1 -E -ftrigraphs %s | grep foo
|
|
RUN: %clang_cc1 -E -ftrigraphs %s | not grep qux
|
|
RUN: %clang_cc1 -E -ftrigraphs %s | not grep xyz
|
|
RUN: %clang_cc1 -fsyntax-only -ftrigraphs -verify %s
|
|
*/
|
|
|
|
// This is a simple comment, /*/ does not end a comment, the trailing */ does.
|
|
int i = /*/ */ 1;
|
|
|
|
/* qux
|
|
|
|
next comment ends with normal escaped newline:
|
|
*/
|
|
|
|
/* expected-warning {{escaped newline}} expected-warning {{backslash and newline}} *\
|
|
/
|
|
|
|
int bar /* expected-error {{expected ';' after top level declarator}} */
|
|
|
|
/* xyz
|
|
|
|
next comment ends with a trigraph escaped newline: */
|
|
|
|
/* expected-warning {{escaped newline between}} expected-warning {{backslash and newline separated by space}} expected-warning {{trigraph ends block comment}} *??/
|
|
/
|
|
|
|
foo
|
|
|
|
|
|
// rdar://6060752 - We should not get warnings about trigraphs in comments:
|
|
// '????'
|
|
/* ???? */
|
|
|
|
// PR50456: multiple escaped newlines in one */.
|
|
/*
|
|
*\
|
|
??/
|
|
??/
|
|
\
|
|
/
|
|
// expected-warning@-5 {{escaped newline}}
|
|
// expected-warning@-4 {{separated by space}}
|
|
// expected-warning@-6 {{trigraph ends block comment}}
|