Skip to content

Commit 667bb32

Browse files
committed
C++: Rename union types to follow the naming convention of IPA types (and make them private)
1 parent 6b27652 commit 667bb32

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

cpp/ql/src/semmle/code/cpp/Declaration.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ class Declaration extends Locatable, @declaration {
289289
}
290290
}
291291

292-
class DeclarationEntryDB = @var_decl or @type_decl or @fun_decl;
292+
private class TDeclarationEntry = @var_decl or @type_decl or @fun_decl;
293293

294294
/**
295295
* 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;
306306
* See the comment above `Declaration` for an explanation of the relationship
307307
* between `Declaration` and `DeclarationEntry`.
308308
*/
309-
class DeclarationEntry extends Locatable, DeclarationEntryDB {
309+
class DeclarationEntry extends Locatable, TDeclarationEntry {
310310
/** Gets a specifier associated with this declaration entry. */
311311
string getASpecifier() { none() }
312312

@@ -373,7 +373,7 @@ class DeclarationEntry extends Locatable, DeclarationEntryDB {
373373
}
374374
}
375375

376-
class AccessHolderDB = @function or @usertype;
376+
private class TAccessHolder = @function or @usertype;
377377

378378
/**
379379
* A declaration that can potentially have more C++ access rights than its
@@ -396,7 +396,7 @@ class AccessHolderDB = @function or @usertype;
396396
* the informal phrase "_R_ occurs in a member or friend of class C", where
397397
* `AccessHolder` corresponds to this _R_.
398398
*/
399-
class AccessHolder extends Declaration, AccessHolderDB {
399+
class AccessHolder extends Declaration, TAccessHolder {
400400
/**
401401
* Holds if `this` can access private members of class `c`.
402402
*

cpp/ql/src/semmle/code/cpp/exprs/Call.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import semmle.code.cpp.exprs.Expr
22
import semmle.code.cpp.Function
33
private import semmle.code.cpp.dataflow.EscapesTree
44

5-
class CallDB = @funbindexpr or @callexpr;
5+
private class TCall = @funbindexpr or @callexpr;
66

77
/**
88
* A C/C++ call.
99
*/
10-
class Call extends Expr, NameQualifiableElement, CallDB {
10+
class Call extends Expr, NameQualifiableElement, TCall {
1111
// `@funbindexpr` (which is the dbscheme type for FunctionCall) is a union type that includes
1212
// `@routineexpr. This dbscheme type includes accesses to functions that are not necessarily calls to
1313
// that function. That's why the charpred for `FunctionCall` requires:

0 commit comments

Comments
 (0)