================
@@ -1784,13 +1784,15 @@ void 
ASTStmtReader::VisitCXXForRangeStmt(CXXForRangeStmt *S) {
 
 void ASTStmtReader::VisitCXXExpansionStmtPattern(CXXExpansionStmtPattern *S) {
   VisitStmt(S);
-  Record.skipInts(1); // Skip kind.
+  Record.skipInts(2); // Skip kind and whether there is an expansion size.
----------------
ojhunt wrote:

Not something to be addressed here but I really wish we had someway to do this 
in a clearer way - my preference would be

```cpp
[[unused]] unsigned kind = Record.readInt();
[[unused]] bool hasExpansionSize = Record.readInt();
```

But I assume that there's a perf cost that makes `skipInts` worthwhile.

I don't know if `readBool`/`writeBool` is more efficient/validated than a raw 
int.

https://github.com/llvm/llvm-project/pull/212319
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to