It's kindof silly that ExtQuals has an ASTContext&, and we can use that
space better. Remove this reference. To make that work, change some APIs
(most importantly, getDesugaredType()) to take an ASTContext& if they
need to return a QualType. Simultaneously, diminish the need to return a
QualType by introducing some useful APIs on SplitQualType, which is
just a std::pair<const Type *, Qualifiers>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121478 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Checker/GRExprEngine.cpp b/lib/Checker/GRExprEngine.cpp
index e01f5d9..efe8fbf 100644
--- a/lib/Checker/GRExprEngine.cpp
+++ b/lib/Checker/GRExprEngine.cpp
@@ -1263,8 +1263,8 @@
// NOTE: Do not use 'isAggregateType()' here as CXXRecordDecls that
// are non-pod are not aggregates.
- assert ((isa<RecordType>(Ex->getType().getDesugaredType()) ||
- isa<ArrayType>(Ex->getType().getDesugaredType())) &&
+ assert ((Ex->getType()->isRecordType() ||
+ Ex->getType()->isArrayType()) &&
"Other kinds of expressions with non-aggregate/union/class types"
" do not have lvalues.");