- Jan 26, 2012
-
-
NAKAMURA Takumi authored
llvm-svn: 149009
-
Anna Zaks authored
using CFArrayCreate & family. Specifically, CFArrayCreate's input should be: 'A C array of the pointer-sized values to be in the new array.' (radar://10717339) llvm-svn: 149008
-
Ted Kremenek authored
Rework flushing of diagnostics to PathDiagnosticConsumer. Now all the reports are batched up before being flushed to the underlying consumer implementation. This allows us to unique reports across analyses to multiple functions (which shows up with inlining). llvm-svn: 148997
-
- Jan 25, 2012
-
-
Ted Kremenek authored
llvm-svn: 148988
-
Ted Kremenek authored
This is accomplished by periodically reclaiming nodes in the graph. This was an optimization done before the CFG was linearized, but the CFG linearization destroyed that optimization since each freshly created node couldn't be reclaimed and we only looked at a window of nodes created between each ProcessStmt. This optimization can be reclaimed my merely expanding the window to N number of nodes. llvm-svn: 148888
-
- Jan 24, 2012
-
-
Anna Zaks authored
llvm-svn: 148844
-
- Jan 21, 2012
-
-
Anna Zaks authored
[analyzer] It's possible to have a non PointerType expression evaluate to a Loc value. When this happens, use the default type. llvm-svn: 148631
-
Anna Zaks authored
Also, slightly modify the diagnostic message in ArrayBound and DivZero (still use 'taint', which might not mean much to the user, but plan on changing it later). llvm-svn: 148626
-
- Jan 20, 2012
-
-
David Blaikie authored
llvm-svn: 148577
-
Anna Zaks authored
llvm-svn: 148566
-
Ted Kremenek authored
Reenable DeadStoresChecker under --analyze, and move the IdempotentOperationsChecker to the 'experimental' category. Fixes <rdar://problem/10146347>. llvm-svn: 148533
-
Ted Kremenek authored
Implement checker that looks for calls to mktemps and friends that have fewer than 6 Xs. Implements <rdar://problem/6336672>. llvm-svn: 148531
-
Ted Kremenek authored
multiple checks are exposed as separate checkers, but CheckerManager only creates one Checker object. llvm-svn: 148525
-
Anna Zaks authored
llvm-svn: 148518
-
Anna Zaks authored
printing. llvm-svn: 148517
-
Anna Zaks authored
at the given location. This could be useful when checkers' logic depends on whether a function is called with a given macro argument. llvm-svn: 148516
-
- Jan 18, 2012
-
-
Anna Zaks authored
TaintPropagationRule::process(). Also remove the "should be a pointer argument" warning - should be handled elsewhere. llvm-svn: 148372
-
Anna Zaks authored
size (Ex: in malloc, memcpy, strncpy..) (Maybe some of this could migrate to the CString checker. One issue with that is that we might want to separate security issues from regular API misuse.) llvm-svn: 148371
-
Anna Zaks authored
functions. llvm-svn: 148370
-
- Jan 17, 2012
-
-
David Blaikie authored
Remove unreachable code in Clang. (replace with llvm_unreachable where appropriate or when GCC requires it) llvm-svn: 148292
-
David Blaikie authored
This allows -Wswitch-enum to find switches that need updating when these enums are modified. llvm-svn: 148281
-
Anna Zaks authored
taint propagation functions. llvm-svn: 148266
-
- Jan 16, 2012
-
-
David Chisnall authored
- Add atomic-to/from-nonatomic cast types - Emit atomic operations for arithmetic on atomic types - Emit non-atomic stores for initialisation of atomic types, but atomic stores and loads for every other store / load - Add a __atomic_init() intrinsic which does a non-atomic store to an _Atomic() type. This is needed for the corresponding C11 stdatomic.h function. - Enables the relevant __has_feature() checks. The feature isn't 100% complete yet, but it's done enough that we want people testing it. Still to do: - Make the arithmetic operations on atomic types (e.g. Atomic(int) foo = 1; foo++;) use the correct LLVM intrinsic if one exists, not a loop with a cmpxchg. - Add a signal fence builtin - Properly set the fenv state in atomic operations on floating point values - Correctly handle things like _Atomic(_Complex double) which are too large for an atomic cmpxchg on some platforms (this requires working out what 'correctly' means in this context) - Fix the many remaining corner cases llvm-svn: 148242
-
David Blaikie authored
llvm-svn: 148229
-
- Jan 14, 2012
-
-
Anna Zaks authored
data. llvm-svn: 148176
-
- Jan 13, 2012
-
-
Anna Zaks authored
radar://10686991 llvm-svn: 148081
-
Anna Zaks authored
llvm-svn: 148080
-
Anna Zaks authored
looking up value at a CodeTextRegion even when the type is not provided. llvm-svn: 148079
-
Anna Zaks authored
llvm-svn: 148078
-
- Jan 12, 2012
-
-
Ted Kremenek authored
[analyzer] fix inlining's handling of mapping actual to formal arguments and limit the call stack depth. The analyzer can now accurately simulate factorial for limited depths. llvm-svn: 148036
-
Anna Zaks authored
+ all the other Retrieve..() methods + a comment for ElementRegion. llvm-svn: 148011
-
Anna Zaks authored
To simplify the process: Refactor taint generation checker to simplify passing the information on which arguments need to be tainted from pre to post visit. Todo: We need to factor out the code that sema is using to identify the string and memcpy functions and use it here and in the CString checker. llvm-svn: 148010
-
- Jan 11, 2012
-
-
Ted Kremenek authored
the common *alloc functions as well as a few tiny wibbles (adds a note to CWE/CERT advisory numbers in the bug output, and fixes a couple 80-column-wide violations.)" Patch by Austin Seipp! llvm-svn: 147931
-
Ted Kremenek authored
Remove '#if 0' from ExprEngine::InlineCall(), and start fresh by wiring up 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
-
- Jan 10, 2012
-
-
Ted Kremenek authored
llvm-svn: 147854
-
- Jan 07, 2012
-
-
Rafael Espindola authored
llvm-svn: 147744
-
Anna Zaks authored
A patch by Dmitri Gribenko! The attached patch fixes a use-after-free in AnalysisConsumer::HandleTranslationUnit. The problem is that BugReporter's destructor runs after AnalysisManager has been already deleted. The fix introduces a scope to force correct destruction order. A crash happens only when reports have been added in AnalysisConsumer::HandleTranslationUnit's BugReporter. We don't have such checkers in clang so no test. llvm-svn: 147732
-
Anna Zaks authored
We already have a more conservative check in the compiler (if the format string is not a literal, we warn). Still adding it here for completeness and since this check is stronger - only triggered if the format string is tainted. llvm-svn: 147714
-
Ted Kremenek authored
This removes analysis of other translation units, but that was an experimental feature anyway that we will revisit later. llvm-svn: 147705
-
Ted Kremenek authored
llvm-svn: 147698
-