================
@@ -106,3 +106,20 @@ enum H {
};
```
````
+
+````{option} AllowConsecutiveInitialValuesExceptLast
+When `true`, enums where all but the last enumerator are explicitly
+initialized with consecutive integer literal values, and the last
----------------
zeyi2 wrote:
`isInitializedByLiteral()` actually checks `isIntegerConstantExpr()`, so the
new option may also accept:
```cpp
enum E {
A = 1 << 0,
B = 1 << 1, // constant expression here
C,
};
```
We'd better double-check if this is the intended behavior (personally, I think
it makes sense) and update the documentation accordingly. A test covering this
distinction would also help :)
https://github.com/llvm/llvm-project/pull/228399
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits