Skip to content

Commit b69df91

Browse files
committed
CPP: Examples Comments.qll.
1 parent bc3e4e4 commit b69df91

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ import semmle.code.cpp.Location
22
import semmle.code.cpp.Element
33

44
/**
5-
* A C/C++ comment.
5+
* A C/C++ comment. For example the comment in the following code:
6+
* ```
7+
* // C++ style single-line comment
8+
* ```
9+
* or a C style comment (which starts with `/*`).
610
*/
711
class Comment extends Locatable, @comment {
812
override string toString() { result = this.getContents() }
@@ -21,7 +25,10 @@ class CStyleComment extends Comment {
2125
}
2226

2327
/**
24-
* A CPP style comment (one which starts with `//`).
28+
* A CPP style comment. For example the comment in the following code:
29+
* ```
30+
* // C++ style single-line comment
31+
* ```
2532
*/
2633
class CppStyleComment extends Comment {
2734
CppStyleComment() {

0 commit comments

Comments
 (0)