[PATCH] D149837: [clang][Interp] Fix ignoring CompoundLiteralExprs

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 4 10:58:53 PDT 2023


aaron.ballman added inline comments.


================
Comment at: clang/test/AST/Interp/literals.cpp:878
 
+    (int){1};
+    (int[]){1,2,3};
----------------
Can you also add a test like:
```
constexpr int oh_my(int x) {
  (int){ x++ };
  return x;
}
static_assert(oh_my(0) == 1);
```
and
```
constexpr int oh_my(int x) {
  int y{x++};
  return x;
}

static_assert(oh_my(0) == 1);
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149837/new/

https://reviews.llvm.org/D149837



More information about the cfe-commits mailing list