C++: Replace getUnderlyingType().getUnspecifiedType()

This commit is contained in:
Robert Marsh
2019-05-20 15:23:08 +01:00
parent e899120270
commit dbdaa1d3f3
10 changed files with 12 additions and 12 deletions

View File

@@ -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."

View File

@@ -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()
)

View File

@@ -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()
)
}