forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libc] Add compile tests for each public header (llvm#122527)
This adds a test that consists of compiling `#include <...>`, pretty much alone, for each public header file in each different language mode (`-std=...` compiler switch) with -Werror and many warnings enabled. There are several headers that have bugs when used alone, and many more headers that have bugs in certain language modes. So for now, compiling the new tests is gated on the cmake switch -DLLVM_LIBC_BUILD_HEADER_TESTS=ON. When all the bugs are fixed, the switch will be removed so future regressions don't land.
- Loading branch information
Showing
3 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/*===-- Test for <@HEADER_NAME@> ----------------------------------------=== | ||
* | ||
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
* See https://llvm.org/LICENSE.txt for license information. | ||
* SPDXList-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
*/ | ||
|
||
#include <@HEADER_NAME@> | ||
|
||
int main(int argc, char **argv) { | ||
(void)argc; | ||
(void)argv; | ||
return 0; | ||
} |