Skip to content

Commit d820fc9

Browse files
committed
C++: Address review comments about the comments
1 parent b52015a commit d820fc9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ abstract class Declaration extends Locatable, @declaration {
9393
* component of `namespaceQualifier`, no declaring type, and a base name of
9494
* `baseName`.
9595
*
96-
* See the 3-argument `hasQualifiedName` for more examples.
96+
* See the 3-argument `hasQualifiedName` for examples.
9797
*/
9898
predicate hasQualifiedName(string namespaceQualifier, string baseName) {
9999
this.hasQualifiedName(namespaceQualifier, "", baseName)

cpp/ql/src/semmle/code/cpp/internal/QualifiedName.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,14 @@ class MemberVariable extends Variable, @membervariable {
230230
override string getName() { membervariables(this, _, result) }
231231
}
232232

233+
// Unlike the usual `EnumConstant`, this one doesn't have a
234+
// `getDeclaringType()`. This simplifies the recursive computation of type
235+
// qualifier names since it can assume that any declaration with a
236+
// `getDeclaringType()` should use that type in its type qualifier name.
233237
class EnumConstant extends Declaration, @enumconstant {
234238
override string getName() { enumconstants(this, _, _, _, result, _) }
235239

236240
UserType getDeclaringEnum() { enumconstants(this, result, _, _, _, _) }
237-
// Unlike the usual `EnumConstant`, this one doesn't have a `getDeclaringType()`.
238241
}
239242

240243
class Function extends Declaration, @function {

0 commit comments

Comments
 (0)