-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[clang][test] add TestLanguage.def to specify all tested language versions #94243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
5chmidti
merged 8 commits into
main
from
users/5chmidti/specify_test_language_versions_in_def_file
Sep 27, 2024
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
1ef1bc0
[clang][test] add TestLanguage.def to specify all tested language ver…
5chmidti d661396
add macro description
5chmidti 4da7732
add c2y
5chmidti cca6b15
Update clang/include/clang/Testing/TestLanguage.def
5chmidti 288fe93
Update clang/include/clang/Testing/TestClangConfig.h
5chmidti a554ad9
cleanup redundant empty TESTLANGUAGE* defines
5chmidti 55bfaa9
better message for unreachable
5chmidti c634f2d
introduce exact `isC[XX](int)` predicates to simplify and deduplicate
5chmidti File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,47 @@ | ||
|
||
//===-- TestLanguage.def - Language Versions for Testing --------*- C++ -*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
// The TESTLANGUAGE(-C/-CXX) macros have four parameters: | ||
// the language, the standard version, the corresponding compile-flag, | ||
// and an index of the language version for each language. | ||
// The standard version is used to compare a standard version numerically, | ||
// and the index is used to impose ordering for the language versions | ||
// with respect to each language. | ||
|
||
#ifndef TESTLANGUAGE | ||
# define TESTLANGUAGE(...) | ||
#endif | ||
|
||
#ifndef TESTLANGUAGE_C | ||
# define TESTLANGUAGE_C(...) TESTLANGUAGE(__VA_ARGS__) | ||
#endif | ||
|
||
#ifndef TESTLANGUAGE_CXX | ||
# define TESTLANGUAGE_CXX(...) TESTLANGUAGE(__VA_ARGS__) | ||
#endif | ||
|
||
TESTLANGUAGE_C(C, 89, c89, 0) | ||
TESTLANGUAGE_C(C, 99, c99, 1) | ||
TESTLANGUAGE_C(C, 11, c11, 2) | ||
TESTLANGUAGE_C(C, 17, c17, 3) | ||
TESTLANGUAGE_C(C, 23, c23, 4) | ||
AaronBallman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
TESTLANGUAGE_C(C, 26, c2y, 5) | ||
|
||
// TESTLANGUAGE_CXX(CXX, 98, c++98, 0) | ||
TESTLANGUAGE_CXX(CXX, 03, c++03, 1) | ||
TESTLANGUAGE_CXX(CXX, 11, c++11, 2) | ||
TESTLANGUAGE_CXX(CXX, 14, c++14, 3) | ||
TESTLANGUAGE_CXX(CXX, 17, c++17, 4) | ||
TESTLANGUAGE_CXX(CXX, 20, c++20, 5) | ||
TESTLANGUAGE_CXX(CXX, 23, c++23, 6) | ||
TESTLANGUAGE_CXX(CXX, 26, c++26, 7) | ||
|
||
#undef TESTLANGUAGE_CXX | ||
#undef TESTLANGUAGE_C | ||
#undef TESTLANGUAGE |
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.