| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
llvm-svn: 146552
|
| |
|
|
|
|
|
|
| |
Some of the test cases do not currently work because the analyzer core
does not seem to call checkers for pre/post DeclRefExpr visits.
(Opened radar://10573500. To be fixed later on.)
llvm-svn: 146536
|
| |
|
|
| |
llvm-svn: 146535
|
| |
|
|
| |
llvm-svn: 146533
|
| |
|
|
|
|
| |
Also, allow adding taint to a region (not only a symbolic value).
llvm-svn: 146532
|
| |
|
|
|
|
| |
free function.
llvm-svn: 146530
|
| |
|
|
|
|
|
| |
handle non-pointer types. This is for the extra info printed when function
types are compared.
llvm-svn: 146525
|
| |
|
|
|
|
| |
in classes. // rdar://10535349
llvm-svn: 146504
|
| |
|
|
|
|
| |
the underlying structural issue that is waiting for a proper solution.
llvm-svn: 146482
|
| |
|
|
| |
llvm-svn: 146480
|
| |
|
|
|
|
| |
be constant expressions.
llvm-svn: 146479
|
| |
|
|
| |
llvm-svn: 146451
|
| |
|
|
| |
llvm-svn: 146448
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Necessary to parse Microsoft ATL code.
Example:
int array[] = {
0,
__if_exists(CLASS::Type) {2, }
3
};
will declare an array of 2 or 3 elements depending on if CLASS::Type exists or not.
llvm-svn: 146447
|
| |
|
|
| |
llvm-svn: 146445
|
| |
|
|
|
|
| |
inside a struct/union.
llvm-svn: 146444
|
| |
|
|
|
|
| |
class has a base whose alignment will break the class layout. <rdar://problem/10551376>.
llvm-svn: 146443
|
| |
|
|
| |
llvm-svn: 146441
|
| |
|
|
|
|
| |
The motivation here is a "clever" implementation of strncmp(), which peels the first few comparisons via chained conditional expressions which ensure that the input arrays are known at compile time to be sufficiently large.
llvm-svn: 146430
|
| |
|
|
|
|
|
| |
fields by just following what comment says.
// rdar://10513599
llvm-svn: 146414
|
| |
|
|
| |
llvm-svn: 146413
|
| |
|
|
|
|
| |
the subdirectories to find headers in submodules.
llvm-svn: 146398
|
| |
|
|
| |
llvm-svn: 146395
|
| |
|
|
|
|
|
| |
actually a terribly good heuristic, and the world is too horrible for
it to work.
llvm-svn: 146393
|
| |
|
|
| |
llvm-svn: 146371
|
| |
|
|
|
|
| |
did not!
llvm-svn: 146366
|
| |
|
|
|
|
| |
diagnostics. No functionality change.
llvm-svn: 146365
|
| |
|
|
|
|
|
|
|
| |
setting the is_zero_undef flag appropriately to true as that matches the
semantics of these GCC builtins.
This is the Clang side of r146357 in LLVM.
llvm-svn: 146358
|
| |
|
|
| |
llvm-svn: 146354
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
UndefOrUnknown value when it cannot reason about the expression.
We are now often generating expressions even if the solver is not known to be able to simplify it. This is another cleanup of the existing code, where the rest of the analyzer and checkers should not base their logic on knowing ahead of the time what the solver can reason about.
In this case, CStringChecker is performing a check for overflow of 'left+right' operation. The overflow can be checked with either 'maxVal-left' or 'maxVal-right'. Previously, the decision was based on whether the expresion evaluated to undef or not. With this patch, we check if one of the arguments is a constant, in which case we know that 'maxVal-const' is easily simplified. (Another option is to use canReasonAbout() method of the solver here, however, it's currently is protected.)
This patch also contains 2 small bug fixes:
- swap the order of operators inside SValBuilder::makeGenericVal.
- handle a case when AddeVal is unknown in GenericTaintChecker::getPointedToSymbol.
llvm-svn: 146343
|
| |
|
|
|
|
| |
Silences valgrind warnings about uninitalized alignment values.
llvm-svn: 146342
|
| |
|
|
|
|
|
| |
Forgot to commit the Header files.
Rename generateUnknownVal -> makeGenericVal.
llvm-svn: 146337
|
| |
|
|
|
|
|
|
| |
Fix a bug in SimpleSValBuilder, where we should swap lhs and rhs when calling generateUnknownVal(), - the function which creates symbolic expressions when data is tainted. The issue is not visible when we only create the expressions for taint since all expressions are commutative from taint perspective.
Refactor SymExpr::symbol_iterator::expand() to use a switch instead of a chain of ifs.
llvm-svn: 146336
|
| |
|
|
|
|
| |
and offer fixits when there is a mismatch.
llvm-svn: 146326
|
| |
|
|
|
|
|
|
| |
free a buffer
and then continue using it. rdar://10359140.
llvm-svn: 146308
|
| |
|
|
|
|
| |
under ARC. Fixes <rdar://problem/10530209>.
llvm-svn: 146307
|
| |
|
|
|
|
|
| |
compilation of some translation units of SPEC's 445.gobmk by ~4%, and does not
seem to cause a measurable slowdown in other cases.
llvm-svn: 146306
|
| |
|
|
|
|
| |
we don't try to access beyond the buffer.
llvm-svn: 146305
|
| |
|
|
|
|
| |
// rdar://10095131
llvm-svn: 146304
|
| |
|
|
|
|
|
|
| |
template instantiation), and that expression might produce a
temporary, invoke MaybeBindToTemporary. Otherwise, we forget to
destroy objects, release objects, etc. Fixes <rdar://problem/10531073>.
llvm-svn: 146301
|
| |
|
|
|
|
|
|
| |
-ffinite-math-only.
- No test case yet, I don't know how to construct a situation where this
matters.
llvm-svn: 146297
|
| |
|
|
| |
llvm-svn: 146291
|
| |
|
|
|
|
|
|
|
|
|
|
| |
whether an expression is a (core) constant expression as a side-effect of
evaluation. This takes us from accepting far too few expressions as ICEs to
accepting slightly too many -- fixes for the remaining cases are coming next.
The diagnostics produced when an expression is found to be non-constant are
currently quite poor (with generic wording but reasonable source locations),
and will be improved in subsequent commits.
llvm-svn: 146289
|
| |
|
|
|
|
| |
fixing the function-to-bool conversion warning.
llvm-svn: 146280
|
| |
|
|
|
|
| |
// rdar://10535245
llvm-svn: 146272
|
| |
|
|
|
|
| |
instantiations. There's no (current) way to fix such templates to emit strong symbols/vtables, but perhaps users want to know about the cost being incurred anyway.
llvm-svn: 146265
|
| |
|
|
|
|
|
| |
".framework/" in the path name, because it could be ".framework\" on
Windows. This whole function needs to be rewritten with PathV2.
llvm-svn: 146261
|
| |
|
|
|
|
| |
comparing inodes doesn't actually work on Windows.
llvm-svn: 146260
|
| |
|
|
| |
llvm-svn: 146259
|
| |
|
|
|
|
| |
in addition to underlying type.
llvm-svn: 146254
|