diff options
Diffstat (limited to 'lib/StaticAnalyzer/Core/CallEvent.cpp')
| -rw-r--r-- | lib/StaticAnalyzer/Core/CallEvent.cpp | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Core/CallEvent.cpp b/lib/StaticAnalyzer/Core/CallEvent.cpp index 52613186677ac..420e2a6b5c8c2 100644 --- a/lib/StaticAnalyzer/Core/CallEvent.cpp +++ b/lib/StaticAnalyzer/Core/CallEvent.cpp @@ -382,6 +382,11 @@ bool AnyFunctionCall::argumentsMayEscape() const {    if (II->isStr("funopen"))      return true; +  // - __cxa_demangle - can reallocate memory and can return the pointer to +  // the input buffer. +  if (II->isStr("__cxa_demangle")) +    return true; +    StringRef FName = II->getName();    // - CoreFoundation functions that end with "NoCopy" can free a passed-in @@ -552,7 +557,7 @@ void CXXInstanceCall::getInitialStackFrameContents(        // FIXME: CallEvent maybe shouldn't be directly accessing StoreManager.        bool Failed; -      ThisVal = StateMgr.getStoreManager().evalDynamicCast(ThisVal, Ty, Failed); +      ThisVal = StateMgr.getStoreManager().attemptDownCast(ThisVal, Ty, Failed);        assert(!Failed && "Calling an incorrectly devirtualized method");      }  | 
