mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
C++: Replace getUnderlyingType().getUnspecifiedType()
This commit is contained in:
@@ -13,6 +13,6 @@
|
||||
import cpp
|
||||
|
||||
from CatchBlock cb, Class caughtType
|
||||
where caughtType = cb.getParameter().getType().getUnderlyingType().getUnspecifiedType()
|
||||
where caughtType = cb.getParameter().getUnspecifiedType()
|
||||
select cb,
|
||||
"This should catch a " + caughtType.getName() + " by (const) reference rather than by value."
|
||||
|
||||
@@ -40,7 +40,7 @@ class TemplateDependentType extends Type {
|
||||
* A variable whose declaration has, or may have, side effects.
|
||||
*/
|
||||
predicate declarationHasSideEffects(Variable v) {
|
||||
exists(Class c | c = v.getType().getUnderlyingType().getUnspecifiedType() |
|
||||
exists(Class c | c = v.getUnspecifiedType() |
|
||||
c.hasConstructor() or
|
||||
c.hasDestructor()
|
||||
)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
import cpp
|
||||
|
||||
predicate declarationHasSideEffects(Variable v) {
|
||||
exists(Class c | c = v.getType().getUnderlyingType().getUnspecifiedType() |
|
||||
exists(Class c | c = v.getUnspecifiedType() |
|
||||
c.hasConstructor() or c.hasDestructor()
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user