We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 26525fc commit 055485dCopy full SHA for 055485d
cpp/ql/src/semmle/code/cpp/Enum.qll
@@ -16,6 +16,13 @@ class Enum extends UserType, IntegralOrEnumType {
16
*/
17
override string explain() { result = "enum " + this.getName() }
18
19
+ override int getSize() {
20
+ // Workaround for extractor bug CPP-348: No size information for enums.
21
+ // If the extractor didn't provide a size, assume four bytes.
22
+ result = UserType.super.getSize() or
23
+ not exists(UserType.super.getSize()) and result = 4
24
+ }
25
+
26
/** See `Type.isDeeplyConst` and `Type.isDeeplyConstBelow`. Internal. */
27
override predicate isDeeplyConstBelow() { any() } // No subparts
28
0 commit comments