[PATCH] D132111: [clang][Interp] Implement pointer (de)ref operations and DeclRefExprs

Tom Honermann via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 19 12:01:55 PDT 2022


tahonermann added inline comments.


================
Comment at: clang/test/AST/Interp/cxx20.cpp:2
+// RUN: %clang_cc1 -fexperimental-new-constant-interpreter -std=c++20 -verify %s
+// RUN: %clang_cc1 -std=c++20 -verify %s -DREFERENCE
+
----------------
tbaeder wrote:
> tahonermann wrote:
> > Is `-DREFERENCE` needed here? I don't see `REFERENCE` referenced in the test. From the other test, I gather that it is intended to annotate differences from the "reference" implementation.
> Yes, exactly. I'll switch this one to use `-verify=ref` as well.
Cool! I didn't know about `-verify=ref`!


================
Comment at: clang/test/AST/Interp/literals.cpp:44
+//static_assert(getIntPointer() == &m, ""); TODO
+//static_assert(*getIntPointer() == &m, ""); TODO
+
----------------
Should be `== 10` for the second case.


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

https://reviews.llvm.org/D132111



More information about the cfe-commits mailing list