isuckatcs updated this revision to Diff 492115.
isuckatcs added a comment.
- Reverted the changes related to clang itself
- Added more checks for exception handling
- `isQualificationConvertiblePointer` is now iterative, not recursive
- Added more test cases
CHANGES SINCE LAST ACTION
https://r
isuckatcs added a comment.
This patch got a little bit out of control at the last revision, so I decided
to remove every change from clang and add everything to the `ExceptionAnalyzer`
only.
The reason for that is with exceptions we have less conversions to check than
we have inside the compile
isuckatcs added a comment.
> E.g., instead of asserting true/false, checking if the assignment would
> compile.
This is actually biased. If the result of the compilation is different from the
result we get from this function, it can also mean a bug in the compiler.
Take a look at this example
isuckatcs updated this revision to Diff 491910.
isuckatcs marked 9 inline comments as done.
isuckatcs added a comment.
Addressed comments
Updated tests
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135495/new/
https://reviews.llvm.org/D135495
Files:
clang-tools-extra/clang-tidy/utils
erichkeane added a comment.
Not a great reviewer here as I'm not particularly sure what is going on, but I
'looked at the clang parts.
Comment at: clang/include/clang/AST/ASTContext.h:2828
+ static bool isQualificationConvertiblePointer(QualType From, QualType To,
+
xazax.hun added a comment.
Overall looks good to me, I wonder if the tests could be less manual though.
E.g., instead of asserting true/false, checking if the assignment would
compile. This way we can be sure that the method in ASTContext matches the
behavior of the compiler (and we get notifie
xazax.hun added a reviewer: erichkeane.
xazax.hun added a comment.
Since now the patch touches Clang proper, adding one more reviewer.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135495/new/
https://reviews.llvm.org/D135495
___
cfe-commits
isuckatcs updated this revision to Diff 489940.
isuckatcs added a comment.
- Renamed and moved `isMultiLevelConvertiblePointer()` to `ASTContext`
- Added a unit test to test the said function
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135495/new/
https://reviews.llvm.org/D135495
Fil
xazax.hun added inline comments.
Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:81
+ FromPointeeTy->getUnqualifiedDesugaredType();
+ const Type *ToPointeeUQTy = ToPointeeTy->getUnqualifiedDesugaredType();
+
Here I am also wonde
isuckatcs added inline comments.
Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:95
+
+ if (P1->isArrayType() && P2->isArrayType()) {
+// At every level that array type is involved in, at least
xazax.hun wrote:
> isuckatcs wrote:
> > xaz
isuckatcs updated this revision to Diff 489626.
isuckatcs marked 7 inline comments as done.
isuckatcs added a comment.
Addressed comments
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135495/new/
https://reviews.llvm.org/D135495
Files:
clang-tools-extra/clang-tidy/utils/ExceptionAnal
xazax.hun added a comment.
Also, could you open a bug report about the strange exception behavior on
GitHub? Hopefully someone working on conformance can take a look.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135495/new/
https://reviews.llvm.org/D135495
___
xazax.hun accepted this revision.
xazax.hun added inline comments.
This revision is now accepted and ready to land.
Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:60
+// Checks if T1 is convertible to T2.
+static bool isMultiLevelConvertiblePointer(QualType
isuckatcs added inline comments.
Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:60
+// Checks if T1 is convertible to T2.
+static bool isMultiLevelConvertiblePointer(QualType P1, QualType P2,
+ unsigned CurrentLevel
xazax.hun added inline comments.
Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:95
+
+ if (P1->isArrayType() && P2->isArrayType()) {
+// At every level that array type is involved in, at least
If none of the functions I recommended work
xazax.hun added inline comments.
Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:60
+// Checks if T1 is convertible to T2.
+static bool isMultiLevelConvertiblePointer(QualType P1, QualType P2,
+ unsigned CurrentLevel
xazax.hun added inline comments.
Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:60
+// Checks if T1 is convertible to T2.
+static bool isMultiLevelConvertiblePointer(QualType P1, QualType P2,
+ unsigned CurrentLevel
isuckatcs added a comment.
ping
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135495/new/
https://reviews.llvm.org/D135495
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
isuckatcs added a comment.
I've found a strange scenario.
The following conversions are allowed
double *a[2][3];
double const * const (*ap)[3] = a; // OK
double * const (*ap1)[] = a; // OK since C++20
However if the same conversion is supposed to be performed in a `catch()`
stateme
isuckatcs updated this revision to Diff 466312.
isuckatcs marked 2 inline comments as done.
isuckatcs added a comment.
Addressed comments and added support for multi-level pointers too.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135495/new/
https://reviews.llvm.org/D135495
Files:
njames93 added inline comments.
Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:81
+ isBaseOf(TPointeeUQTy, BPointeeUQTy)) &&
+ (TCVR == 0 || (BCVR ^ TCVR) == 0 || (BCVR & TCVR) > BCVR)) {
+TypesToDelete.push_back(T);
--
isuckatcs updated this revision to Diff 466269.
isuckatcs marked an inline comment as done.
isuckatcs added a comment.
Addressed inline comment
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135495/new/
https://reviews.llvm.org/D135495
Files:
clang-tools-extra/clang-tidy/utils/Excepti
Eugene.Zelenko added inline comments.
Comment at: clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp:68
+
+ auto BPointeeUQTy = BPointeeTy->getUnqualifiedDesugaredType();
+ auto TPointeeUQTy = TPointeeTy->getUnqualifiedDesugaredType();
Please don'
isuckatcs updated this revision to Diff 466204.
isuckatcs edited the summary of this revision.
isuckatcs added a comment.
Updated
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135495/new/
https://reviews.llvm.org/D135495
Files:
clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp
isuckatcs created this revision.
isuckatcs added reviewers: njames93, baloghadamsoftware, aaron.ballman,
LegalizeAdulthood.
Herald added subscribers: carlosgalvezp, manas, ASDenysPetrov, dkrupp,
donat.nagy, Szelethus, a.sidorin, rnkovacs, xazax.hun.
Herald added a project: All.
isuckatcs requeste
25 matches
Mail list logo