summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/inline.c
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] When inlining, make sure we use the definition decl.Jordan Rose2012-07-091-1/+14
| | | | | | | | | | | This was a regression introduced during the CallEvent changes; a call to FunctionDecl::hasBody was also being used to replace the decl found by lookup with the actual definition. To keep from making this mistake again (particularly if/when we start inlining Objective-C methods), this commit adds a "getDefinition()" method to CallEvent, which should do the right thing under any circumstances. llvm-svn: 159940
* [analyzer] Rework inlining related command line options.Anna Zaks2012-03-081-1/+1
| | | | | | | | | - Remove -analyzer-inline-call. - Add -analyzer-ipa=[none|inlining] - Add -analyzer-inlining-mode to allow experimentation for different performance tuning methods. llvm-svn: 152351
* Teak CallAndMessageChecker to only warn about uninitialized struct fields in ↵Ted Kremenek2012-03-051-0/+13
| | | | | | | | | | call arguments when the called function is never inlined. Fixes <rdar://problem/10977037>. llvm-svn: 152073
* [analyzer] do not warn about returning stack-allocated memory when it comes ↵Ted Kremenek2012-03-031-0/+19
| | | | | | from an ancestor stack frame. llvm-svn: 151964
* [analyzer] fix inlining's handling of mapping actual to formal arguments and ↵Ted Kremenek2012-01-121-0/+30
| | | | | | limit the call stack depth. The analyzer can now accurately simulate factorial for limited depths. llvm-svn: 148036
* Remove '#if 0' from ExprEngine::InlineCall(), and start fresh by wiring up ↵Ted Kremenek2012-01-111-1/+0
| | | | | | | | | | inlining for straight C calls. My hope is to reimplement this from first principles based on the simplifications of removing unneeded node builders and re-evaluating how C++ calls are handled in the CFG. The hope is to turn inlining "on-by-default" as soon as possible with a core set of things working well, and then expand over time. llvm-svn: 147904
* Begin reworking static analyzer support for C++ method calls. The current ↵Ted Kremenek2011-03-301-0/+1
| | | | | | | | | | | logic was divorced from how we process ordinary function calls, had a tremendous about of redundancy, and relied strictly on inlining behavior (which was incomplete) to provide semantics instead of falling back to the conservative analysis we use for C functions. This is a significant step into making C++ analyzer support more useful. llvm-svn: 128557
* [analyzer] Remove '-analyzer-check-objc-mem' flag, the nominee for best ↵Argyrios Kyrtzidis2011-02-281-1/+1
| | | | | | misnomer award. llvm-svn: 126676
* [analyzer] Migrate NSErrorChecker and DereferenceChecker to CheckerV2.Argyrios Kyrtzidis2011-02-281-1/+1
| | | | | | | | They cooperate in that NSErrorChecker listens for ImplicitNullDerefEvent events that DereferenceChecker can dispatch. ImplicitNullDerefEvent is when we dereferenced a location that may be null. llvm-svn: 126659
* Teach RegionStore::EnterStackFrame() to handleTed Kremenek2011-01-141-3/+13
| | | | | | | | | | | the case where the called function has fewer formal arguments than actual arguments. This fixes a crash in the analyzer when doing function call inlining. Patch by Zhenbo Xu! llvm-svn: 123458
* Turn -analyzer-inline-call on for C functions. This also fixed a bug thatZhongxing Xu2010-05-061-2/+2
| | | | | | after inlining post-call checking shouldn't be done. llvm-svn: 103161
* Refactor the AnalysisConsumer to analyze functions after the whole Zhongxing Xu2010-04-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | translation unit is parsed. This enables us to inline some calls when still analyzing one function at a time. Actions are classified into Function, CXXMethod, ObjCMethod, ObjCImplementation. This does not hurt performance much. The analysis time for sqlite3.c: before: real 17m52.440s user 17m49.460s sys 0m2.010s after: real 18m0.500s user 17m56.900s sys 0m2.330s DisplayProgress option is broken now. -inine-call action is removed. It will be reenabled in another form, perhaps as an indenpendant option. llvm-svn: 102689
* Tweak null dereference diagnostics to give clearer diagnostics whenTed Kremenek2010-03-231-1/+1
| | | | | | a null dereference results from a field access. llvm-svn: 99236
* Add test case for inlining call analysis.Zhongxing Xu2010-02-271-0/+20
llvm-svn: 97300
OpenPOWER on IntegriCloud