C++: Rename union types to follow the naming convention of IPA types (and make them private)

This commit is contained in:
Mathias Vorreiter Pedersen
2020-06-30 08:40:46 +02:00
parent 6b27652b99
commit 667bb323ac
2 changed files with 6 additions and 6 deletions

View File

@@ -289,7 +289,7 @@ class Declaration extends Locatable, @declaration {
}
}
class DeclarationEntryDB = @var_decl or @type_decl or @fun_decl;
private class TDeclarationEntry = @var_decl or @type_decl or @fun_decl;
/**
* A C/C++ declaration entry. For example the following code contains five
@@ -306,7 +306,7 @@ class DeclarationEntryDB = @var_decl or @type_decl or @fun_decl;
* See the comment above `Declaration` for an explanation of the relationship
* between `Declaration` and `DeclarationEntry`.
*/
class DeclarationEntry extends Locatable, DeclarationEntryDB {
class DeclarationEntry extends Locatable, TDeclarationEntry {
/** Gets a specifier associated with this declaration entry. */
string getASpecifier() { none() }
@@ -373,7 +373,7 @@ class DeclarationEntry extends Locatable, DeclarationEntryDB {
}
}
class AccessHolderDB = @function or @usertype;
private class TAccessHolder = @function or @usertype;
/**
* A declaration that can potentially have more C++ access rights than its
@@ -396,7 +396,7 @@ class AccessHolderDB = @function or @usertype;
* the informal phrase "_R_ occurs in a member or friend of class C", where
* `AccessHolder` corresponds to this _R_.
*/
class AccessHolder extends Declaration, AccessHolderDB {
class AccessHolder extends Declaration, TAccessHolder {
/**
* Holds if `this` can access private members of class `c`.
*

View File

@@ -2,12 +2,12 @@ import semmle.code.cpp.exprs.Expr
import semmle.code.cpp.Function
private import semmle.code.cpp.dataflow.EscapesTree
class CallDB = @funbindexpr or @callexpr;
private class TCall = @funbindexpr or @callexpr;
/**
* A C/C++ call.
*/
class Call extends Expr, NameQualifiableElement, CallDB {
class Call extends Expr, NameQualifiableElement, TCall {
// `@funbindexpr` (which is the dbscheme type for FunctionCall) is a union type that includes
// `@routineexpr. This dbscheme type includes accesses to functions that are not necessarily calls to
// that function. That's why the charpred for `FunctionCall` requires: