Skip to content

Commit 1d05b21

Browse files
committed
Add test coverage for -Wunknown-directives; NFC
While working on #embed, I noticed that the PR accidentally broke the warning group but no tests failed as a result. This is adding the missing test coverage.
1 parent 07c18a0 commit 1d05b21

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/test/Preprocessor/suggest-typoed-directive.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// RUN: %clang_cc1 -fsyntax-only -verify=pre-c2x-cpp23 %s
2+
// RUN: %clang_cc1 -fsyntax-only -Wno-unknown-directives -verify=okay %s
23
// RUN: %clang_cc1 -std=c2x -fsyntax-only -verify=c2x-cpp23 %s
34
// RUN: %clang_cc1 -x c++ -std=c++23 -fsyntax-only -verify=c2x-cpp23 %s
45
// RUN: %clang_cc1 -x c++ -std=c++23 -fsyntax-only %s -fdiagnostics-parseable-fixits 2>&1 | FileCheck %s
6+
// okay-no-diagnostics
57

68
// id: pre-c2x-cpp23-warning@+12 {{invalid preprocessing directive, did you mean '#if'?}}
79
// ifd: pre-c2x-cpp23-warning@+12 {{invalid preprocessing directive, did you mean '#if'?}}

0 commit comments

Comments
 (0)