Skip to content

Commit a84f192

Browse files
committed
CPP: Add a scoped enum example.
1 parent abd4d39 commit a84f192

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@ import semmle.code.cpp.Type
22
private import semmle.code.cpp.internal.ResolveClass
33

44
/**
5-
* A C/C++ enum [N4140 7.2]. For example, the type `MyEnum` in:
5+
* A C/C++ enum [N4140 7.2]. For example, the types `MyEnum` and
6+
* `MyScopedEnum` in:
67
* ```
78
* enum MyEnum {
89
* MyEnumConstant
910
* };
11+
*
12+
* enum class MyScopedEnum {
13+
* MyScopedEnumConstant
14+
* };
1015
* ```
1116
* This includes C++ scoped enums, see the `ScopedEnum` QL class.
1217
*/

0 commit comments

Comments
 (0)