-
Notifications
You must be signed in to change notification settings - Fork 2k
C++: Remove deprecated code #21896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C++: Remove deprecated code #21896
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --- | ||
| category: breaking | ||
| --- | ||
| * Removed the deprecated `overrideReturnsNull` predicate from `Options.qll`. Use `CustomOptions.overrideReturnsNull` instead. | ||
| * Removed the deprecated `returnsNull` predicate from `Options.qll`. Use `CustomOptions.returnsNull` instead. | ||
| * Removed the deprecated `exits` predicate from `Options.qll`. Use `CustomOptions.exits` instead. | ||
| * Removed the deprecated `exprExits` predicate from `Options.qll`. Use `CustomOptions.exprExits` instead. | ||
| * Removed the deprecated `alwaysCheckReturnValue` predicate from `Options.qll`. Use `CustomOptions.alwaysCheckReturnValue` instead. | ||
| * Removed the deprecated `okToIgnoreReturnValue` predicate from `Options.qll`. Use `CustomOptions.okToIgnoreReturnValue` instead. | ||
| * Removed the deprecated `semmle.code.cpp.Member`. Import `semmle.code.cpp.Element` and/or `semmle.code.cpp.Type` directly. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #3783 |
||
| * Removed the deprecated `UnknownDefaultLocation` class. Use `UnknownLocation` instead. | ||
| * Removed the deprecated `UnknownExprLocation` class. Use `UnknownLocation` instead. | ||
| * Removed the deprecated `UnknownStmtLocation` class. Use `UnknownLocation` instead. | ||
|
Comment on lines
+11
to
+13
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #17581 |
||
| * Removed the deprecated `TemplateParameter` class. Use `TypeTemplateParameter` instead. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See #18320 |
||
| * Support for class resolution across link targets has been removed for databases which were created with CodeQL versions before 1.23.0. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,59 +1,5 @@ | ||
| import semmle.code.cpp.Type | ||
|
|
||
| /** For upgraded databases without mangled name info. */ | ||
| pragma[noinline] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We remove
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's no
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now I see that! Thanks for the clarification |
||
| private string getTopLevelClassName(@usertype c) { | ||
| not mangled_name(_, _, _) and | ||
| isClass(c) and | ||
| usertypes(c, result, _) and | ||
| not namespacembrs(_, c) and // not in a namespace | ||
| not member(_, _, c) and // not in some structure | ||
| not class_instantiation(c, _) // not a template instantiation | ||
| } | ||
|
|
||
| /** | ||
| * For upgraded databases without mangled name info. | ||
| * Holds if `d` is a unique complete class named `name`. | ||
| */ | ||
| pragma[noinline] | ||
| private predicate existsCompleteWithName(string name, @usertype d) { | ||
| not mangled_name(_, _, _) and | ||
| is_complete(d) and | ||
| name = getTopLevelClassName(d) and | ||
| onlyOneCompleteClassExistsWithName(name) | ||
| } | ||
|
|
||
| /** For upgraded databases without mangled name info. */ | ||
| pragma[noinline] | ||
| private predicate onlyOneCompleteClassExistsWithName(string name) { | ||
| not mangled_name(_, _, _) and | ||
| strictcount(@usertype c | is_complete(c) and getTopLevelClassName(c) = name) = 1 | ||
| } | ||
|
|
||
| /** | ||
| * For upgraded databases without mangled name info. | ||
| * Holds if `c` is an incomplete class named `name`. | ||
| */ | ||
| pragma[noinline] | ||
| private predicate existsIncompleteWithName(string name, @usertype c) { | ||
| not mangled_name(_, _, _) and | ||
| not is_complete(c) and | ||
| name = getTopLevelClassName(c) | ||
| } | ||
|
|
||
| /** | ||
| * For upgraded databases without mangled name info. | ||
| * Holds if `c` is an incomplete class, and there exists a unique complete class `d` | ||
| * with the same name. | ||
| */ | ||
| private predicate oldHasCompleteTwin(@usertype c, @usertype d) { | ||
| not mangled_name(_, _, _) and | ||
| exists(string name | | ||
| existsIncompleteWithName(name, c) and | ||
| existsCompleteWithName(name, d) | ||
| ) | ||
| } | ||
|
|
||
| pragma[noinline] | ||
| private @mangledname getClassMangledName(@usertype c) { | ||
| isClass(c) and | ||
|
|
@@ -103,10 +49,7 @@ private module Cached { | |
| @usertype resolveClass(@usertype c) { | ||
| hasCompleteTwin(c, result) | ||
| or | ||
| oldHasCompleteTwin(c, result) | ||
| or | ||
| not hasCompleteTwin(c, _) and | ||
| not oldHasCompleteTwin(c, _) and | ||
| result = c | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These have been deprecated from before the open sourcing of the CodeQL query code.