forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2820 from SavchenkoValeriy/april_analyzer_cherry_…
…picks_2 Static analyzer cherry picks #22
- Loading branch information
Showing
8 changed files
with
244 additions
and
71 deletions.
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
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,19 @@ | ||
// RUN: %clang_analyze_cc1 -std=c++20 -w -analyzer-checker=core -verify %s | ||
|
||
// expected-no-diagnostics | ||
|
||
namespace std { | ||
struct strong_ordering { | ||
int n; | ||
constexpr operator int() const { return n; } | ||
static const strong_ordering equal, greater, less; | ||
}; | ||
constexpr strong_ordering strong_ordering::equal = {0}; | ||
constexpr strong_ordering strong_ordering::greater = {1}; | ||
constexpr strong_ordering strong_ordering::less = {-1}; | ||
} // namespace std | ||
|
||
void test() { | ||
// no crash | ||
(void)(0 <=> 0); | ||
} |
Oops, something went wrong.