When assigning to them, we can't classify the expression type, because that doesn't contain the right information. And when reading from them, we need to do the extra deref, just like we do when reading from a DeclRefExpr.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM
clang/lib/AST/Interp/ByteCodeExprGen.cpp | ||
---|---|---|
814 | What is the effect here or is this just stylistic? |
clang/lib/AST/Interp/ByteCodeExprGen.cpp | ||
---|---|---|
814 | 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. |
What is the effect here or is this just stylistic?