]> granicus.if.org Git - clang/commit
Start migration of static analyzer to using the
authorTed Kremenek <kremenek@apple.com>
Thu, 16 Dec 2010 07:46:53 +0000 (07:46 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 16 Dec 2010 07:46:53 +0000 (07:46 +0000)
commit892697dd2287caf7c29aaaa82909b0e90b8b63fe
tree0b6e5e8d01ef17d240bc41ca53a77705cba6228c
parent48263bae23707b11cfdc89944233d03089a01f97
Start migration of static analyzer to using the
implicit lvalue-to-rvalue casts that John McCall
recently introduced.  This causes a whole bunch
of logic in the analyzer for handling lvalues
to vanish.  It does, however, raise a few issues
in the analyzer w.r.t to modeling various constructs
(e.g., field accesses to compound literals).

The .c/.m analysis test cases that fail are
due to a missing lvalue-to-rvalue cast that
will get introduced into the AST.  The .cpp
failures were more than I could investigate in
one go, and the patch was already getting huge.
I have XFAILED some of these tests, and they
should obviously be further investigated.

Some highlights of this patch include:

- CFG no longer requires an lvalue bit for
  CFGElements
- StackFrameContext doesn't need an 'asLValue'
  flag
- The "VisitLValue" path from GRExprEngine has
  been eliminated.

Besides the test case failures (XFAILed), there
are surely other bugs that are fallout from
this change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121960 91177308-0d34-0410-b5e6-96231b3b80d8
22 files changed:
include/clang/Analysis/AnalysisContext.h
include/clang/Analysis/CFG.h
include/clang/Checker/PathSensitive/AnalysisManager.h
include/clang/Checker/PathSensitive/CheckerVisitor.def
include/clang/Checker/PathSensitive/CheckerVisitor.h
include/clang/Checker/PathSensitive/GRExprEngine.h
lib/Analysis/AnalysisContext.cpp
lib/Analysis/CFG.cpp
lib/Analysis/PseudoConstantAnalysis.cpp
lib/Analysis/ReachableCode.cpp
lib/Checker/AggExprVisitor.cpp
lib/Checker/BugReporterVisitors.cpp
lib/Checker/DereferenceChecker.cpp
lib/Checker/Environment.cpp
lib/Checker/GRCXXExprEngine.cpp
lib/Checker/GRCoreEngine.cpp
lib/Checker/GRExprEngine.cpp
test/Analysis/constant-folding.c
test/Analysis/idempotent-operations.c
test/Analysis/method-call.cpp
test/Analysis/misc-ps-region-store.cpp
test/Analysis/reference.cpp