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 lookup error in case of nested fwd decls in C #500

Closed martong closed 5 years ago

martong commented 6 years ago

This fixes the C lang related lookup problem.

      // DeclContext based lookup may not find forward declared structs in C.
      // For instance, consider that this code had been already parsed into the
      // "To" context:
      //   struct A { struct X *Xp; };
      // In this case localUncachedLookup will not find the forward decl of X.
      // Thus, we do an identifier based search through the front end specific
      // void pointers whic are injected into the DeclarationName objects.
martong commented 5 years ago

@balazske, @gamesh411 Thank you for your comments. I am preparing another PR which is superior to this one. The new PR would handle both this C lang problem and other lookup related problems. Hopefully we will not need this PR.

martong commented 5 years ago

Closed in favor of #505 , which is superior to this.