Skip to content

Commit aec0e98

Browse files
authored
Merge pull request github#5017 from rvermeulen/patch-2
C++: Correct pointer to data member example
2 parents 902bade + 1834403 commit aec0e98

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ class Type extends Locatable, @type {
274274

275275
/**
276276
* Gets this type with any typedefs resolved. For example, given
277-
* `typedef C T`, this would resolve `const T&` to `const C&`.
277+
* `typedef C T`, this would resolve `const T&` to `const C&`.
278278
* Note that this will only work if the resolved type actually appears
279279
* on its own elsewhere in the program.
280280
*/
@@ -1544,9 +1544,9 @@ class FunctionPointerIshType extends DerivedType {
15441544
/**
15451545
* A C++ pointer to data member. See 15.5.
15461546
* ```
1547-
* class C { int m; };
1547+
* class C { public: int m; };
15481548
* int C::* p = &C::m; // pointer to data member m of class C
1549-
* class C *;
1549+
* class C c;
15501550
* int val = c.*p; // access data member
15511551
* ```
15521552
*/

0 commit comments

Comments
 (0)