Skip to content

Commit d649835

Browse files
committed
CPP: Add an explanatory comment on WideCharType and Wchar_t.
1 parent 4720c5a commit d649835

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,10 @@ class VoidType extends BuiltInType {
601601

602602
/**
603603
* The C/C++ wide character type.
604+
*
605+
* Note that on some platforms `wchar_t` doesn't exist as a built-in
606+
* type but a typedef is provided. Consider using the `Wchar_t` QL
607+
* class to include these types.
604608
*/
605609
class WideCharType extends IntegralType {
606610

cpp/ql/src/semmle/code/cpp/commons/CommonType.qll

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ class Uintmax_t extends Type {
8080

8181
/**
8282
* The C/C++ wchar_t type.
83+
*
84+
* Note that on some platforms `wchar_t` doesn't exist as a built-in
85+
* type but a typedef is provided. This QL class includes both cases
86+
* (see also `WideCharType`).
8387
*/
8488
class Wchar_t extends Type {
8589
Wchar_t() {

0 commit comments

Comments
 (0)