baloghadamsoftware created this revision.
A new checker to check whether multiple iterators which should refer to the
same container refer to different ones. Here we include comparisons,
constructors which take an iterator pair and any template function which takes
iterator pair(s).
baloghadamsoftware updated this revision to Diff 86709.
baloghadamsoftware added a comment.
Herald added a subscriber: mgorny.
The checker itself disappeared mystically from the previous diff...
https://reviews.llvm.org/D29419
Files:
include/clang/StaticAnalyzer/Checkers/Checkers.td
baloghadamsoftware updated this revision to Diff 86428.
baloghadamsoftware added a comment.
Updates based on the comments.
https://reviews.llvm.org/D28771
Files:
lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp
test/Analysis/Inputs/system-header-simulator-cxx.h
baloghadamsoftware added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:530
+ auto value = RVal;
+ if (auto loc = value.getAs()) {
+value = State->getRawSVal(*loc);
NoQ wrote:
> Is there a test case for this hack?
>
>
baloghadamsoftware added a comment.
Some comments how I found this bug. I got some strange false positives even
after the fix for the iterator past end checker
(https://reviews.llvm.org/D28771). I could reproduce it with the following code:
#include
using std::list;
using std::prev;
baloghadamsoftware added a comment.
I wonder if this could also be a problem for nested messages in Objective-C,
since the call for VisitChildren() is also missing from
VisitObjCMessageExpr()...
https://reviews.llvm.org/D29183
___
cfe-commits
baloghadamsoftware created this revision.
Take the following example:
class Int {
public:
Int(int n = 0): num(n) {}
Int(const Int& rhs): num(rhs.num) {}
Int& operator=(const Int& rhs) { num = rhs.num; }
operator int() { return num; }
private:
int num;
};
baloghadamsoftware added a comment.
In https://reviews.llvm.org/D29183#657669, @xazax.hun wrote:
> Great find! Could you transform your examole into a testcasr that fails
> before this patch? I think there should be already some tests for call
> graphs that you can take a look at.
Yes, but
baloghadamsoftware added a comment.
In https://reviews.llvm.org/D29183#657706, @NoQ wrote:
> Hmm, we should have done better work reviewing
> https://reviews.llvm.org/D28905.
Oh, someone was quicker than me by one week...
https://reviews.llvm.org/D29183
baloghadamsoftware updated this revision to Diff 89211.
baloghadamsoftware added a comment.
checkBind replaces checking of DeclStmt, CXXConstructExpr and assignment
operators. Incremention by 0 is not a bug anymore regardless the position of
the iterator.
https://reviews.llvm.org/D28771
baloghadamsoftware marked 2 inline comments as done.
baloghadamsoftware added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/MismatchedIteratorChecker.cpp:311
+
+void MismatchedIteratorChecker::checkPostStmt(const DeclStmt *DS,
+
baloghadamsoftware updated this revision to Diff 89123.
baloghadamsoftware added a comment.
Updated according to the comments.
https://reviews.llvm.org/D29419
Files:
include/clang/StaticAnalyzer/Checkers/Checkers.td
lib/StaticAnalyzer/Checkers/CMakeLists.txt
baloghadamsoftware added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:530
+ auto value = RVal;
+ if (auto loc = value.getAs()) {
+value = State->getRawSVal(*loc);
NoQ wrote:
> baloghadamsoftware wrote:
> > NoQ wrote:
baloghadamsoftware added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:530
+ auto value = RVal;
+ if (auto loc = value.getAs()) {
+value = State->getRawSVal(*loc);
NoQ wrote:
> baloghadamsoftware wrote:
> > NoQ wrote:
baloghadamsoftware created this revision.
baloghadamsoftware added reviewers: zaks.anna, NoQ.
baloghadamsoftware added subscribers: xazax.hun, o.gyorgy, cfe-commits.
This patch fixes some issues for the IteratorPastEnd checkers. There are
basically two main issues this patch targets: one is the
baloghadamsoftware added a comment.
Could you please remove the IteratorPastEndChecker file differences from this
patch and make https://reviews.llvm.org/D25660 dependent on this one?
https://reviews.llvm.org/D27202
___
cfe-commits mailing list
baloghadamsoftware added a comment.
https://reviews.llvm.org/D27202 is now a dependency, but cannot add it.
Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:166
+IteratorPastEndChecker::IteratorPastEndChecker() {
+ PastEndBugType.reset(new BugType(this,
baloghadamsoftware updated this revision to Diff 80728.
baloghadamsoftware marked 4 inline comments as done.
baloghadamsoftware added a comment.
Minor corrections, comments, some new tests, test input headers merged.
https://reviews.llvm.org/D25660
Files:
baloghadamsoftware added a comment.
In https://reviews.llvm.org/D25660#613519, @zaks.anna wrote:
> Also, have you evaluated this on real codebases? What results do you see? Are
> there any false positives found? Are there any true positives found?
I am doing it right now. Unfortunately I
baloghadamsoftware updated this revision to Diff 81224.
baloghadamsoftware added a comment.
Now isInStdNamespace is used. Hack is back so https://reviews.llvm.org/D27202
is not a dependency now.
https://reviews.llvm.org/D25660
Files:
include/clang/StaticAnalyzer/Checkers/Checkers.td
baloghadamsoftware added inline comments.
Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h:282
+ static inline bool isCompoundType(QualType T) {
+return T->isArrayType() || T->isRecordType() ||
Could you please move this function into a
baloghadamsoftware added a comment.
Hi!
There is an option to disable the checking of widening casts. It is enabled by
default. You can disable it any time. Or, if you find too much false positives,
we can discuss about setting this option to disabled as default.
I am convinced that checking
baloghadamsoftware abandoned this revision.
baloghadamsoftware added a comment.
Whole checker superseeded by https://reviews.llvm.org/D31975.
https://reviews.llvm.org/D28771
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
baloghadamsoftware abandoned this revision.
baloghadamsoftware marked an inline comment as done.
baloghadamsoftware added a comment.
Superseeded by patch https://reviews.llvm.org/D31975.
https://reviews.llvm.org/D29419
___
cfe-commits mailing list
baloghadamsoftware created this revision.
Herald added a subscriber: mgorny.
This is an old checker used only internally until now. The original author is
Bence Babati, I added him as a subscriber.
The checker checks whather exceptions escape the main() function, destructors.
functions with
baloghadamsoftware added a comment.
Hello! I am not sure how to split it to incremental patches. As I mentioned in
the description, the state of the iterator position is always tracked. So if I
remove some of the checks it does not make the patch much smaller, since the
checking part is quite
baloghadamsoftware created this revision.
Herald added a subscriber: whisperity.
Users reported some false positives using this check. This patch sets the
default value of the option for checking implicit widening casts to false. We
also suggest renaming the check to something like
baloghadamsoftware added a comment.
OK, please create a patch where implicit casts are disabled by default. You can
also find a new name for the checker.
Repository:
rL LLVM
https://reviews.llvm.org/D31097
___
cfe-commits mailing list
baloghadamsoftware added a comment.
Or I can do it for you if you wish.
Repository:
rL LLVM
https://reviews.llvm.org/D31097
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
baloghadamsoftware added a comment.
What do you suggest? Should we widen the type of the difference, or abandon
this patch and revert back to the local solution I originally used in the
iterator checker?
https://reviews.llvm.org/D35109
___
baloghadamsoftware added a comment.
I think we should exclude unsigned types completely. `A >= B` is converted to
`A - B >= 0`, thus the range of `A - B` is `[0 .. INT_MAX]` which is the full
range for the unsigned type. This implies that upon any conditional statement
`if (A >= B) ...` the
baloghadamsoftware added a comment.
I tested the latest revision (this fronted patch already included) on my test
file in https://reviews.llvm.org/D33537. Disregarding of the (not so important)
check-specific parameters (`EnabledFunctions` and `IgnoredExceptions`) I do not
get warnings for any
baloghadamsoftware added inline comments.
Comment at: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:511
+ SSE->getLHS()->getType()->isSignedIntegerOrEnumerationType() ||
+ SSE->getLHS()->getType()->isPointerType()) {
+ return negV->Negate(BV,
baloghadamsoftware added a comment.
The other possibility is to make the difference signed.
https://reviews.llvm.org/D35109
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
baloghadamsoftware updated this revision to Diff 106627.
baloghadamsoftware added a comment.
Type selection simplified, FIXME added.
https://reviews.llvm.org/D35110
Files:
lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
test/Analysis/constraint_manager_negate_difference.c
baloghadamsoftware updated this revision to Diff 106626.
baloghadamsoftware added a comment.
Difference of unsigned is converted to signed.
https://reviews.llvm.org/D35109
Files:
include/clang/AST/ASTContext.h
lib/AST/ASTContext.cpp
lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
baloghadamsoftware added a comment.
In https://reviews.llvm.org/D33537#771274, @aaron.ballman wrote:
> The check in https://reviews.llvm.org/D3 is using a CFG, not just
> checking direct throws.
I tested the latest revision (the fronted patch already included) on my test
file.
baloghadamsoftware updated this revision to Diff 105628.
baloghadamsoftware added a comment.
Type check added and restricted to additive operators.
https://reviews.llvm.org/D35109
Files:
lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
test/Analysis/std-c-library-functions.c
baloghadamsoftware marked an inline comment as done.
baloghadamsoftware added a comment.
In https://reviews.llvm.org/D35109#801921, @NoQ wrote:
> Because integer promotion rules are tricky, could we, for now, avoid dealing
> with the situation when left-hand side and right-hand side and the
baloghadamsoftware marked an inline comment as done.
baloghadamsoftware added inline comments.
Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:583
+newRhs = BasicVals.evalAPSInt(BO_Add, *lInt, *rInt);
+reverse = (lop == BO_Add);
+ }
baloghadamsoftware added a comment.
In https://reviews.llvm.org/D35109#806156, @NoQ wrote:
> I think you might also need to convert `APSInt`s to an appropriate type, as
> done above. Type of right-hand-side `APSInt`s do not necessarily coincide
> with the type of the left-hand-side symbol or
baloghadamsoftware updated this revision to Diff 107032.
baloghadamsoftware added a comment.
Rearrangement of unsigned comparison removed (FIXME added). Comment regarding
the types of integer constants added.
https://reviews.llvm.org/D35109
Files:
baloghadamsoftware added inline comments.
Comment at: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:511
+ SSE->getLHS()->getType()->isSignedIntegerOrEnumerationType() ||
+ SSE->getLHS()->getType()->isPointerType()) {
+ return negV->Negate(BV,
baloghadamsoftware updated this revision to Diff 107079.
baloghadamsoftware added a comment.
I think I checked the type of the left side of the difference, not the
difference itself. Thus the difference is not a pointer type, it is a signed
integer type, the tests pass when I remove that line.
baloghadamsoftware added inline comments.
Comment at: test/clang-tidy/readability-static-accessed-through-instance.cpp:34
+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: static member accessed through
instance [readability-static-accessed-through-instance]
+ // CHECK-FIXES:
baloghadamsoftware added a comment.
I am not sure whether we should copy with such ugly things as overloaded member
access operators with side effects, but they can also cause troubles using this
fix:
#include
using std::cout;
using std::endl;
struct C {
static int N;
baloghadamsoftware added inline comments.
Comment at: test/clang-tidy/readability-static-accessed-through-instance.cpp:34
+ // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: static member accessed through
instance [readability-static-accessed-through-instance]
+ // CHECK-FIXES:
baloghadamsoftware created this revision.
Since the range-based constraint manager (default) is weak in handling
comparisons where symbols are on both sides it is wise to rearrange them to
have symbols only on the left side. Thus e.g. `A + n >= B + m` becomes `A - B
>= m - n` which enables the
baloghadamsoftware updated this revision to Diff 105593.
baloghadamsoftware added a comment.
Wrong patch files was uploaded first.
https://reviews.llvm.org/D35110
Files:
lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
test/Analysis/ptr-arith.c
Index: test/Analysis/ptr-arith.c
baloghadamsoftware created this revision.
If range `[m .. n]` is stored for symbolic expression `A - B`, then we can
deduce the range for `B - A` which is [-n .. -m]. This is only true for signed
types, unless the range is `[0 .. 0]`.
https://reviews.llvm.org/D35110
Files:
baloghadamsoftware updated this revision to Diff 105594.
baloghadamsoftware added a comment.
Simplified for enhanced SValBuilder and ConstraintManager.
https://reviews.llvm.org/D32642
Files:
lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
test/Analysis/Inputs/system-header-simulator-cxx.h
baloghadamsoftware added a comment.
Thank you for your help.
Actually, I did neither merge the patches nor the checkers. Based on the
experiences in the prototype I created a totally new checker. Incremental
development sounds good, but I did a lot of experimenting in this particular
checker,
baloghadamsoftware created this revision.
Herald added a subscriber: mgorny.
This is the first part of the new Iterator Checker. This part contains the very
core infrastructure. It only checks for out-of-range iterators in a very simple
case.
https://reviews.llvm.org/D32592
Files:
baloghadamsoftware updated this revision to Diff 97060.
baloghadamsoftware added a comment.
Checker and test included now :-)
https://reviews.llvm.org/D32592
Files:
include/clang/StaticAnalyzer/Checkers/Checkers.td
lib/StaticAnalyzer/Checkers/CMakeLists.txt
baloghadamsoftware updated this revision to Diff 109117.
baloghadamsoftware added a comment.
Overflow scenarios skipped.
https://reviews.llvm.org/D35109
Files:
lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp
test/Analysis/svalbuilder-rearrange-comparisons.c
Index:
baloghadamsoftware updated this revision to Diff 109126.
baloghadamsoftware added a comment.
Herald added a subscriber: JDevlieghere.
Test changed. I made some bad throws reachable, but the frontend check still
does detects them.
https://reviews.llvm.org/D33537
Files:
baloghadamsoftware updated this revision to Diff 98275.
baloghadamsoftware marked 11 inline comments as done.
baloghadamsoftware added a comment.
Updated according to the review.
https://reviews.llvm.org/D32592
Files:
include/clang/StaticAnalyzer/Checkers/Checkers.td
baloghadamsoftware added a comment.
In https://reviews.llvm.org/D32592#747132, @NoQ wrote:
> Then, in methods that deal with iterator `SVal`s directly, i wish we had
> hints explaining what's going on in these ~7 cases. In my opinion, that'd
> greatly help people understand the code later, and
baloghadamsoftware added a comment.
I tried `SValBuilder::evalBinOp()` first but it did not help too much. It could
decide only if I compared the same conjured symbols or different ones, but
nothing more. It always gave me `UnknownVal`. Even if comparing ${conj_X} ==
${conj_X} + n where n was
baloghadamsoftware updated this revision to Diff 103568.
baloghadamsoftware added a comment.
Minor fixes according to the comments.
https://reviews.llvm.org/D32642
Files:
lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
test/Analysis/Inputs/system-header-simulator-cxx.h
baloghadamsoftware added a comment.
Now I can improve `SValBuilder` to compare `{conj_X}+n` to `conj_X}+m`, but I
am not sure if it helps to simplify `compare()` much. How to handle cases where
I have to compare `{conj_X}+n` to `{conj_Y}+m`, an we have a range `[k..k]` for
`{conj_X}-{conj_Y}`
baloghadamsoftware added a comment.
Any progress in the review?
https://reviews.llvm.org/D32642
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
baloghadamsoftware added a comment.
> I'm sure that simplification `(($x + N) + M) ~> ($x + (M + N))` is already
> working in `SValBuilder`.
No, it is unfortunately not working: I tried to increase `${conj_X}` by `1`,
then again by `1`, and I got symbolic expression `(${conj_X}+1)+1)`.
baloghadamsoftware updated this revision to Diff 103728.
baloghadamsoftware added a comment.
`SymbolManager::getSymIntExpr()` replaced by `SValBuilder::evalBinOp()`,
function `compact()` eliminated.
https://reviews.llvm.org/D32642
Files:
lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
baloghadamsoftware updated this revision to Diff 100382.
baloghadamsoftware added a comment.
Ignoring bad_alloc.
https://reviews.llvm.org/D33537
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/ExceptionEscapeCheck.cpp
clang-tidy/misc/ExceptionEscapeCheck.h
baloghadamsoftware created this revision.
Herald added a subscriber: mgorny.
Finds functions which should not throw exceptions: Destructors, move
constructors, move assignment operators, the main() function, swap() functions,
functions marked with throw() or noexcept and functions given as
baloghadamsoftware added a comment.
Supersedes https://reviews.llvm.org/D32350
https://reviews.llvm.org/D33537
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
baloghadamsoftware abandoned this revision.
baloghadamsoftware added a comment.
Superseded by https://reviews.llvm.org/D33537
https://reviews.llvm.org/D32350
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
baloghadamsoftware added a comment.
Any comments regarding the last changes?
https://reviews.llvm.org/D32592
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
baloghadamsoftware updated this revision to Diff 100239.
baloghadamsoftware added a comment.
Comments added and fixed.
https://reviews.llvm.org/D32592
Files:
include/clang/StaticAnalyzer/Checkers/Checkers.td
lib/StaticAnalyzer/Checkers/CMakeLists.txt
baloghadamsoftware updated this revision to Diff 100369.
baloghadamsoftware added a comment.
Docs fixed according to the comments.
https://reviews.llvm.org/D33537
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/ExceptionEscapeCheck.cpp
clang-tidy/misc/ExceptionEscapeCheck.h
baloghadamsoftware added a comment.
In https://reviews.llvm.org/D33537#764834, @Prazek wrote:
> How is that compared to https://reviews.llvm.org/D19201 and the clang patch
> mentioned in this patch?
Actually, this check does much more. It does not only check for noexcept (and
throw())
baloghadamsoftware updated this revision to Diff 100374.
baloghadamsoftware added a comment.
Check added to the Release Notes.
https://reviews.llvm.org/D33537
Files:
clang-tidy/misc/CMakeLists.txt
clang-tidy/misc/ExceptionEscapeCheck.cpp
clang-tidy/misc/ExceptionEscapeCheck.h
baloghadamsoftware added a comment.
In https://reviews.llvm.org/D33537#770264, @aaron.ballman wrote:
> I think we should try to get as much of this functionality in
> https://reviews.llvm.org/D3 as possible; there is a considerable amount
> of overlap between that functionality and this
baloghadamsoftware updated this revision to Diff 100848.
baloghadamsoftware added a comment.
Rebased to (committed) Part1 (https://reviews.llvm.org/rL304160) and updated
according to comments.
https://reviews.llvm.org/D32642
Files:
lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
baloghadamsoftware added a comment.
The matcher in https://reviews.llvm.org/D33537 could be reused here as well.
Maybe I should make it common, but it is more complex than any of the common
matchers.
Repository:
rL LLVM
https://reviews.llvm.org/D31370
baloghadamsoftware added a comment.
There is a patch (https://reviews.llvm.org/D33537) for a check which is a
superset of this: It does not only check for noexcept (and throw()) functions,
but also for destructors, move constructors, move assignments, the main()
function, swap() functions and
baloghadamsoftware added inline comments.
Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:211-214
+std::pair
+createDifference(SymbolManager , SymbolRef Sym1, SymbolRef Sym2);
+const llvm::APSInt *getDifference(ProgramStateRef State,
baloghadamsoftware created this revision.
Extension of the mismatched iterator checker for constructors taking range of
first..last (first and last must be iterators of the same container) and also
for comparisons of iterators of different containers (one does not compare
iterators of
baloghadamsoftware created this revision.
This patch adds explicit evaluation of the following functions: std::find,
std::find_end, std::find_first_of, std::find_if, std::find_if_not,
std::lower_bound, std::upper_bound, std::search and std::search_n. On the one
hand this is an optimization
baloghadamsoftware created this revision.
This patch adds support for the following operations in the iterator checkers:
assign, clear, insert, insert_after, emplace, emplace_after, erase and
erase_after. This affects mismatched iterator checks ("this" and parameter must
match) and
baloghadamsoftware added a comment.
Split to 10 parts.
https://reviews.llvm.org/D31975
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
baloghadamsoftware created this revision.
check::Bind() is not invoked for parameter passing. We use a trick instead: in
checkBeginFunction we copy the positions of iterator parameters from the
arguments to the parameters.
https://reviews.llvm.org/D32906
Files:
baloghadamsoftware updated this revision to Diff 97942.
baloghadamsoftware added a comment.
Wrong diff.
https://reviews.llvm.org/D32902
Files:
lib/StaticAnalyzer/Checkers/IteratorChecker.cpp
test/Analysis/Inputs/system-header-simulator-cxx.h
baloghadamsoftware created this revision.
If a container is moved by its move assignment operator, according to the
standard all their iterators except the past-end iterators remain valid but
refer to the new container. This patch introduces support for this case in the
iterator checkers.
baloghadamsoftware added a comment.
I am considering to restrict the assumptions to nodes marked as interesting and
to the location of the bug. However, I have difficulties with the latter, it
seems that the bug location itself is not part of the bug path.
https://reviews.llvm.org/D34508
baloghadamsoftware added a comment.
I think that the acceptable false positive rate of a compiler warning is much
lower than that of a Tidy check. So I understand that the fronted patch will
not handle the indirect cases (which are the most important in my opinion) or
the cases where there are
baloghadamsoftware added a comment.
It seems that Artem's suggestion is not enough (or I misunderstood it). So two
options remain: either we drop this and revert to the local solution in the
Iterator Checkers or we extend the type when rearranging the comparison. Which
way to go?
baloghadamsoftware added a comment.
I tried to extend the type to avoid overflow scenarios. Unfortunately, this
breaks essential calculations based on the overflow scenarios (e.g.
ProgramSate::assumeInbound()). So I see no other option than to abandon this
patch and return to the local
baloghadamsoftware updated this revision to Diff 116662.
baloghadamsoftware added a comment.
If both sides have concrete integers, they must be in range [min/4..max/4], if
only one, it must be in range [min/2..max/2].
https://reviews.llvm.org/D35109
Files:
baloghadamsoftware added a comment.
In https://reviews.llvm.org/D35110#854334, @zaks.anna wrote:
> Is this blocked on the same reasons as what was raised in
> https://reviews.llvm.org/D35109?
No, it is blocked because https://reviews.llvm.org/D35109 is a prerequisite.
baloghadamsoftware added a comment.
Anna, Devin, should I proceed with Artem's suggested way?
https://reviews.llvm.org/D35109
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
baloghadamsoftware created this revision.
When dumping SymIntExpr or IntSymExpr signed numbers are dumped as unsigned,
thus their two's complement is displayed. This small patch fixes this.
https://reviews.llvm.org/D39048
Files:
lib/StaticAnalyzer/Core/SymbolManager.cpp
baloghadamsoftware created this revision.
Herald added subscribers: mgorny, srhines.
A possible error is to write ``malloc(strlen(s+1))`` instead of
``malloc(strlen(s)+1)``. Unfortunately the former is also valid syntactically,
but allocates less memory by two bytes (if ``s`` is at least one
baloghadamsoftware added a comment.
We take the conservative approach there: if a function has no `throw` specifier
we handle it as it would have a `noexcept` specifier.
https://reviews.llvm.org/D33537
___
cfe-commits mailing list
baloghadamsoftware added a comment.
Let us summarize the possibilities:
1. Type extension approach. I tested it, all tests pass, and also in Devin's
examples we do not infer narrower range than we should. (Wider do not matter.)
I think this is the most complete solution and many checkers could
baloghadamsoftware closed this revision.
baloghadamsoftware added a comment.
Closed by commit https://reviews.llvm.org/rL318909.
https://reviews.llvm.org/D39366
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
baloghadamsoftware closed this revision.
baloghadamsoftware added a comment.
Closed by commit https://reviews.llvm.org/rL318912.
https://reviews.llvm.org/D39367
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
baloghadamsoftware added a comment.
In https://reviews.llvm.org/D33537#902242, @JonasToth wrote:
>
> Will this check find stuff like this (or is it part of the frontend)
>
> int throwing() {
> throw int(42);
> }
>
> int not_throwing() noexcept {
> throwing();
> }
baloghadamsoftware closed this revision.
baloghadamsoftware marked 2 inline comments as done.
baloghadamsoftware added a comment.
https://reviews.llvm.org/rL318906 and https://reviews.llvm.org/rL318907
https://reviews.llvm.org/D39121
___
1 - 100 of 977 matches
Mail list logo