diff options
Diffstat (limited to 'contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp')
| -rw-r--r-- | contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp b/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp index fb07484bfcd9..80a3fbe1a409 100644 --- a/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp +++ b/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp @@ -143,20 +143,20 @@ static bool typesCompatible(ASTContext &C, QualType A, QualType B) {    while (true) {      A = A.getCanonicalType();      B = B.getCanonicalType(); -   +      if (A.getTypePtr() == B.getTypePtr())        return true; -     +      if (const PointerType *ptrA = A->getAs<PointerType>())        if (const PointerType *ptrB = B->getAs<PointerType>()) {          A = ptrA->getPointeeType();          B = ptrB->getPointeeType();          continue;        } -       +      break;    } -   +    return false;  }  | 
