C++: Remove extra type check in AV Rule 82

These type checks were overlapping with `assignOperatorWithWrongType` is
are no longer needed now that `assignOperatorWithWrongType` is improved.
They were causing FPs and misleading error messages on uninstantiated
templates.
This commit is contained in:
Jonas Jensen
2018-12-04 11:16:33 +01:00
parent 8ac427c387
commit 6239455a91
3 changed files with 1 additions and 5 deletions

View File

@@ -51,7 +51,6 @@ predicate dereferenceThis(Expr e) {
* This includes functions whose body is not in the database.
*/
predicate returnsPointerThis(Function f) {
f.getType().getUnspecifiedType() instanceof PointerType and
forall(ReturnStmt s | s.getEnclosingFunction() = f and reachable(s) |
// `return this`
pointerThis(s.getExpr())
@@ -64,7 +63,6 @@ predicate returnsPointerThis(Function f) {
* database.
*/
predicate returnsDereferenceThis(Function f) {
f.getType().getUnspecifiedType() instanceof ReferenceType and
forall(ReturnStmt s | s.getEnclosingFunction() = f and reachable(s) |
// `return *this`
dereferenceThis(s.getExpr())