[clang] 1d05b21 - Add test coverage for -Wunknown-directives; NFC

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 30 08:00:56 PST 2023


Author: Aaron Ballman
Date: 2023-11-30T11:00:46-05:00
New Revision: 1d05b21e035f579af2f96b4a61847d2c9f358ac2

URL: https://github.com/llvm/llvm-project/commit/1d05b21e035f579af2f96b4a61847d2c9f358ac2
DIFF: https://github.com/llvm/llvm-project/commit/1d05b21e035f579af2f96b4a61847d2c9f358ac2.diff

LOG: 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.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/test/Preprocessor/suggest-typoed-directive.c b/clang/test/Preprocessor/suggest-typoed-directive.c
index c7130ad8031caf3..c4bd5328594dd5b 100644
--- a/clang/test/Preprocessor/suggest-typoed-directive.c
+++ b/clang/test/Preprocessor/suggest-typoed-directive.c
@@ -1,7 +1,9 @@
 // RUN: %clang_cc1 -fsyntax-only -verify=pre-c2x-cpp23 %s
+// RUN: %clang_cc1 -fsyntax-only -Wno-unknown-directives -verify=okay %s
 // RUN: %clang_cc1 -std=c2x -fsyntax-only -verify=c2x-cpp23 %s
 // RUN: %clang_cc1 -x c++ -std=c++23 -fsyntax-only -verify=c2x-cpp23 %s
 // RUN: %clang_cc1 -x c++ -std=c++23 -fsyntax-only %s -fdiagnostics-parseable-fixits 2>&1 | FileCheck %s
+// okay-no-diagnostics
 
 // id:        pre-c2x-cpp23-warning at +12 {{invalid preprocessing directive, did you mean '#if'?}}
 // ifd:       pre-c2x-cpp23-warning at +12 {{invalid preprocessing directive, did you mean '#if'?}}


        


More information about the cfe-commits mailing list