]> granicus.if.org Git - clang/commit
[analyzer] For now, don't inline non-static member overloaded operators.
authorJordan Rose <jordan_rose@apple.com>
Tue, 3 Jul 2012 22:55:57 +0000 (22:55 +0000)
committerJordan Rose <jordan_rose@apple.com>
Tue, 3 Jul 2012 22:55:57 +0000 (22:55 +0000)
commitfdaa33818cf9bad8d092136e73bd2e489cb821ba
treed2124dc5e73ae1f7efb84dde2c3e8a535a8c1742
parent3b5f9dc024232fe3bde347f6b52155ff7f55a232
[analyzer] For now, don't inline non-static member overloaded operators.

Our current inlining support (specifically RegionStore::enterStackFrame)
doesn't know that calls to overloaded operators may be calls to non-static
member functions, and that in these cases the first argument should be
treated as 'this'. This caused incorrect results and sometimes crashes.

The long-term fix will be to rewrite RegionStore::enterStackFrame to use
CallEvent and its subclasses, but for now we can just disable these
problematic calls by classifying them under a new CallEvent,
CXXMemberOperatorCall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159692 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/StaticAnalyzer/Core/PathSensitive/Calls.h
lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
lib/StaticAnalyzer/Core/Calls.cpp
lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
test/Analysis/operator-calls.cpp