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

Propagate error from ImportDeclContext #587

Closed martong closed 5 years ago

martong commented 5 years ago

During analysis of one E/// project we failed to import one CXXDestructorDecl. But since we did not propagate the error in importDeclContext we had a CXXRecordDecl without a destructor. Then the analyzer engine had a CallEvent where the nonexistent dtor was requested (crash).

Solution is to propagate the errors we have during importing a DeclContext. (Note, this is not trivial which errors to propagate, see the comments in the code.)

By propagating errors it could happen that we tried to remove a decl twice from the Lookuptable (crash), hence the second part of the change.

martong commented 5 years ago

ping