aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CFG.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-03-19 23:48:41 +0000
committerTed Kremenek <kremenek@apple.com>2012-03-19 23:48:41 +0000
commit4cf225382a8b061dce41733c962d62b6db9721f8 (patch)
treeb73bb9e3430f9bb993f62e08467bb98f1c0c8ef3 /lib/Analysis/CFG.cpp
parent0822c5f29d91a08697416b0d0be28dd3e71d945a (diff)
Fix crash when querying the CFG reported when using the thread safety analysis
on code using multi-dimensional arrays. Fix by DeLesley Hutchins, and reported in PR 12271. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153067 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFG.cpp')
-rw-r--r--lib/Analysis/CFG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/CFG.cpp b/lib/Analysis/CFG.cpp
index 0a844a0376..24ca958827 100644
--- a/lib/Analysis/CFG.cpp
+++ b/lib/Analysis/CFG.cpp
@@ -3087,7 +3087,7 @@ CFGImplicitDtor::getDestructorDecl(ASTContext &astContext) const {
const VarDecl *var = cast<CFGAutomaticObjDtor>(this)->getVarDecl();
QualType ty = var->getType();
ty = ty.getNonReferenceType();
- if (const ArrayType *arrayType = astContext.getAsArrayType(ty)) {
+ while (const ArrayType *arrayType = astContext.getAsArrayType(ty)) {
ty = arrayType->getElementType();
}
const RecordType *recordType = ty->getAs<RecordType>();