diff options
author | Jan Voung <jvoung@google.com> | 2025-03-04 15:48:42 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-04 15:48:42 -0500 |
commit | d6301b218c6698ceb0db1753c8de480d37d11cf8 (patch) | |
tree | 9f9310deb254ef2921efaa83ba7285d766b21948 /clang/unittests/Analysis/FlowSensitive/TransferTest.cpp | |
parent | 855178af99ac6597f3ae09c3c9b7edbc37b28009 (diff) | |
download | llvm-d6301b218c6698ceb0db1753c8de480d37d11cf8.zip llvm-d6301b218c6698ceb0db1753c8de480d37d11cf8.tar.gz llvm-d6301b218c6698ceb0db1753c8de480d37d11cf8.tar.bz2 |
Revert "[clang][dataflow] Fix unsupported types always being equal" (#129761)
Reverts llvm/llvm-project#129502
seeing new crashes around
https://github.com/google/crubit/blob/859520eca82d60a169fb85cdbf648c57d0a14a99/nullability/test/smart_pointers_diagnosis.cc#L57
Would like some time to investigate.
Diffstat (limited to 'clang/unittests/Analysis/FlowSensitive/TransferTest.cpp')
-rw-r--r-- | clang/unittests/Analysis/FlowSensitive/TransferTest.cpp | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp b/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp index f52b73d..0f731f4 100644 --- a/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp +++ b/clang/unittests/Analysis/FlowSensitive/TransferTest.cpp @@ -4974,41 +4974,6 @@ TEST(TransferTest, IntegerLiteralEquality) { }); } -TEST(TransferTest, UnsupportedValueEquality) { - std::string Code = R"( - // An explicitly unsupported type by the framework. - enum class EC { - A, - B - }; - - void target() { - EC ec = EC::A; - - bool unsupported_eq_same = (EC::A == EC::A); - bool unsupported_eq_other = (EC::A == EC::B); - bool unsupported_eq_var = (ec == EC::B); - - (void)0; // [[p]] - } - )"; - runDataflow( - Code, - [](const llvm::StringMap<DataflowAnalysisState<NoopLattice>> &Results, - ASTContext &ASTCtx) { - const Environment &Env = getEnvironmentAtAnnotation(Results, "p"); - - // We do not model the values of unsupported types, so this - // seemingly-trivial case will not be true either. - EXPECT_TRUE(isa<AtomicBoolValue>( - getValueForDecl<BoolValue>(ASTCtx, Env, "unsupported_eq_same"))); - EXPECT_TRUE(isa<AtomicBoolValue>( - getValueForDecl<BoolValue>(ASTCtx, Env, "unsupported_eq_other"))); - EXPECT_TRUE(isa<AtomicBoolValue>( - getValueForDecl<BoolValue>(ASTCtx, Env, "unsupported_eq_var"))); - }); -} - TEST(TransferTest, CorrelatedBranches) { std::string Code = R"( void target(bool B, bool C) { |