[PATCH] D136012: [clang][Interp] Fix record members of reference type
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 24 20:25:53 PDT 2022
tbaeder marked an inline comment as done.
tbaeder added inline comments.
================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:867
- if (Optional<PrimType> T = classify(Init->getType())) {
+ if (Optional<PrimType> T = classify(Init)) {
if (!this->visit(Init))
----------------
shafik wrote:
> What is the effect here or is this just stylistic?
```
llvm::Optional<PrimType> classify(const Expr *E) const {
return E->isGLValue() ? PT_Ptr : classify(E->getType());
}
llvm::Optional<PrimType> classify(QualType Ty) const {
return Ctx.classify(Ty);
}
```
Passing the full `Expr` will return `PT_Ptr` for references.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136012/new/
https://reviews.llvm.org/D136012
More information about the cfe-commits
mailing list