Skip to content

Commit 970014f

Browse files
authored
Revert simplification because LangAS is not convertible to bool
1 parent 2ceb18b commit 970014f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/StaticAnalyzer/Core/MemRegion.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,8 @@ MemRegionManager::getElementRegion(QualType elementType, NonLoc Idx,
12221222
// The address space must be preserved because some target-specific address
12231223
// spaces influence the size of the pointer value which is represented by the
12241224
// element region.
1225-
if (LangAS AS = elementType.getAddressSpace()) {
1225+
LangAS AS = elementType.getAddressSpace();
1226+
if (AS != LangAS::Default) {
12261227
Qualifiers Quals;
12271228
Quals.setAddressSpace(AS);
12281229
T = Ctx.getQualifiedType(T, Quals);

0 commit comments

Comments
 (0)