mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-25 06:18:56 -04:00

-trigraphs is now an alias for -ftrigraphs. -fno-trigraphs makes it possible to explicitly disable trigraphs, which couldn't be done before. clang -std=c++11 -fno-trigraphs now builds without GNU extensions, but with trigraphs disabled. Previously, trigraphs were only disabled in GNU modes or with -std=c++1z. Make the new -f flags the cc1 interface too. This requires changing -trigraphs to -ftrigraphs in a few cc1 tests. Related to PR21974. llvm-svn: 224790
35 lines
927 B
C
35 lines
927 B
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:
|
|
// '????'
|
|
/* ???? */
|