User Details
- User Since
- May 23 2018, 7:08 AM (151 w, 6 d)
Wed, Apr 14
Tue, Apr 13
Add another test.
Rebase, changed documentation, small fix in the code, more tests added.
Mon, Apr 12
Ping.
The check now handles only check of allocation failure at new.
Fri, Apr 9
Rebase, changed test according to review comments.
Wed, Apr 7
Fix a crash, update documentation.
Tue, Apr 6
Rename the check to "unhandled-bad_alloc" (or similar")? And the error message to " missing exception handler 'std::bad_alloc' "?
Removed check of possible exceptions from constructor call.
Thu, Apr 1
It works not reliable for all data types. If char is used instead of int (in the test), the allocated size may be larger than the intended size of the array, probably because memory alignment adjustments. In the following case it is possible to index "past the end" of the array for some first indices (until 12?).
struct S { int n; char x; char s[]; }; struct S *s = (struct S *)malloc(sizeof(struct S) + 10); s.s[12] = 12;
Add 'core' to enabled checks in test.
Split the test file.
Test should be updated.
Wed, Mar 31
Test failures occurred, fix of the problem is not trivial, probably the test file should be split.
Tue, Mar 30
Use mayThrow, improve test (user and class-specific cases).
Mon, Mar 29
My idea was that if we have an already existing C AST then the mode of it could be changed to C++, without changing other nodes. Then it is possible to import C++ nodes.
For ASTConverter, I think about something similar to ASTImporter, but the To AST is always empty at start and one correct From AST can be imported into it. This "import" performs the conversion and build of AST nodes. This converted AST can then be processed with normal ASTImporter.
I did not mean to reuse ASTImporter, that is a possibility too. Probably it can be more easy to handle AST conversion only without importing, specially if during the conversion no kind of error can occur, so no error handling or ODR search are needed. The conversion can happen before doing the AST import (with converted AST).
Fri, Mar 26
I think it would be better to have a fully new module for converting AST between language versions. It would do only conversion, not AST merge. The ASTImporter is already too large and complicated (should be split into files) code, with this conversion logic embedded into other import functions and with multiple language versions (in the future) it would be really hard to debug (number of special cases at import increases and is already big).
Wed, Mar 24
Tue, Mar 23
Ping.
I am not sure how to the test should be changed.
Fixed according to the comments.
Rebase and changed test code format.
Mon, Mar 22
Simplified the test somewhat.
Add regular expression to test, removed space characters from line endings.
Mar 19 2021
Mar 18 2021
Add accidentally removed empty line.
Change of text in dump, add a test.
Mar 17 2021
I did not notice that ImportVariables is different than ImportDecl, I like the first version of the test better (with ImportDecl) (but the current is not wrong), can you change it back only at a different position (line 738 can be good, before test "ImportRecordTypeInFunc")?
Mar 16 2021
Looks good, just find a better place for the test.
Exactly the case is (I think) that the mutex goes out of scope and we have not checked if it was really destroyed. Still the program can check later if it was destroyed (like the if in the test case). A resource leak may be the problem (if destroy failed) so a warning like "possible resource leak if destroy call fails" can be added. The case is detected in checkDeadSymbols that may make adding a good warning more difficult.
This patch makes one TODO less and it is possible to debug cases like in the next (in stack) change.
Mar 12 2021
Improved commit message.
Mar 10 2021
rebase, split the test case
Mar 9 2021
Ping.
Mar 8 2021
Adding test of notes.
Tests are re-arranged significantly.
Mar 5 2021
I tried to test the notes but could not get it to work. I think the problem is related to the fact that the notes are displayed at different locations that are past or before the current warning. The solution could be to manually specify line numbers in the CHECK-NOTE parts but I do not like this (and did not tried it). Or is there other solution?
Mar 4 2021
Ping.
Mar 2 2021
Mar 1 2021
Checks about code formatting are likely not to be accepted. Formatting can be done in external tool and is not subject for checks. The difference is that it is not possible to format separately for one rule only (with clang-format). But the better option should be to format the whole code instead of parts of it.
Feb 26 2021
Rebase, fixes according to review comments.
There should be already a name lookup implemented somewhere in clang (DeclContext? or Sema) that maybe usable here (check if the name of the "used" entity is visible in the declaration context of the using statement). Probably it is not as simple to do because the using is already there and it may depend on the order.
You can look into misc/UnusedUsingDeclsCheck.cpp (if not done yet), that check handles using too. And that check is related to this check, the module should be the same too (misc)?
Feb 25 2021
Feb 23 2021
Feb 22 2021
Rebase, improved documentation.
Ping
Feb 19 2021
Feb 18 2021
- Fixed remaining formatting and rename problems.
- Removed tryExpandAsInteger, use matcher instead.
- Improved test.