Ericsson / clang

Cross Translation Unit analysis capability for Clang Static Analyzer. (Fork of official clang at http://llvm.org/git/clang)
http://clang.llvm.org/
Other
15 stars 10 forks source link

Fix segfault #517

Closed martong closed 5 years ago

balazske commented 5 years ago

There is a similar problem in (or near) line 3594:

        if (FoundArray && TArray) {
          if (isa<IncompleteArrayType>(FoundArray) &&
              isa<ConstantArrayType>(TArray)) {
            // Import the type.
            QualType T = Importer.Import(D->getType()); // <--
            if (T.isNull())
              return nullptr;

            FoundVar->setType(T);
            FoundByLookup = FoundVar;
            break;
          } else if (isa<IncompleteArrayType>(TArray) &&
martong commented 5 years ago

Ok, fixed that one too. Also, I've found another one, related to Objc, but could not fix that because related lit tests would fail.