Skip to content

Commit f3fdef0

Browse files
committed
separate ConcreteInt case from CompoundVal case.
1 parent c1083bb commit f3fdef0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

clang/lib/StaticAnalyzer/Core/RegionStore.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2187,10 +2187,12 @@ std::optional<SVal> RegionStoreManager::getBindingForDerivedDefaultValue(
21872187

21882188
// Lazy bindings are usually handled through getExistingLazyBinding().
21892189
// We should unify these two code paths at some point.
2190-
// 'nonloc::ConcreteInt' values can arise from compound literals in
2190+
if (isa<nonloc::LazyCompoundVal, nonloc::CompoundVal>(val))
2191+
return val;
2192+
2193+
// 'nonloc::ConcreteInt' values can arise from e.g. compound literals in
21912194
// designated initializers for bitfields in unions.
2192-
if (isa<nonloc::LazyCompoundVal, nonloc::CompoundVal, nonloc::ConcreteInt>(
2193-
val))
2195+
if (isa<nonloc::ConcreteInt>(val))
21942196
return val;
21952197

21962198
llvm_unreachable("Unknown default value");

0 commit comments

Comments
 (0)