[PATCH] D141497: [clang][Interp] Record initialization via conditional operator

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 24 01:21:40 PDT 2023


tbaeder added inline comments.


================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.h:182-183
 
+  template <typename VisitFn>
+  bool visitConditional(const AbstractConditionalOperator *E, VisitFn V);
+
----------------
aaron.ballman wrote:
> The template definition isn't available within the header file, so this is fragile (impossible to instantiate from anything but ByteCodeExprGen.cpp).
What's the alternative? If I make it a static function in `ByteCodeExprGen.cpp`, I'd have to make a lot of members of `ByteCodeEmitter` etc. public which  is not a very clean solution. Moving the definition into the header file isn't very nice either, all the others are in the source file.


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

https://reviews.llvm.org/D141497



More information about the cfe-commits mailing list