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

Lookup Cannot find type dependent declarations #503

Closed dkrupp closed 5 years ago

dkrupp commented 5 years ago

Example 1

struct A{
  struct X* p; //in this case fw declaration of X is not found by importing (localUncachedLookup)
}

Example 2

template <class T>
struct X{
  friend foo(T t); //foo is not found by the importer (as it is not in the lookup table)
  f();
};

Fix: create an ASTImporter specific lookup table that also contains the above mentioned cases.

dkrupp commented 5 years ago

505 fixes this issue