forked from OSchip/llvm-project
fix PR4026: Clang can't codegen __func__ without implicit cast
llvm-svn: 69747
This commit is contained in:
parent
d79b5a85b0
commit
2f343dd5c8
|
@ -64,16 +64,19 @@ public:
|
||||||
void VisitMemberExpr(MemberExpr *ME) { EmitAggLoadOfLValue(ME); }
|
void VisitMemberExpr(MemberExpr *ME) { EmitAggLoadOfLValue(ME); }
|
||||||
void VisitUnaryDeref(UnaryOperator *E) { EmitAggLoadOfLValue(E); }
|
void VisitUnaryDeref(UnaryOperator *E) { EmitAggLoadOfLValue(E); }
|
||||||
void VisitStringLiteral(StringLiteral *E) { EmitAggLoadOfLValue(E); }
|
void VisitStringLiteral(StringLiteral *E) { EmitAggLoadOfLValue(E); }
|
||||||
void VisitCompoundLiteralExpr(CompoundLiteralExpr *E)
|
void VisitCompoundLiteralExpr(CompoundLiteralExpr *E) {
|
||||||
{ EmitAggLoadOfLValue(E); }
|
EmitAggLoadOfLValue(E);
|
||||||
|
}
|
||||||
void VisitArraySubscriptExpr(ArraySubscriptExpr *E) {
|
void VisitArraySubscriptExpr(ArraySubscriptExpr *E) {
|
||||||
EmitAggLoadOfLValue(E);
|
EmitAggLoadOfLValue(E);
|
||||||
}
|
}
|
||||||
|
void VisitBlockDeclRefExpr(const BlockDeclRefExpr *E) {
|
||||||
|
EmitAggLoadOfLValue(E);
|
||||||
|
}
|
||||||
|
void VisitPredefinedExpr(const PredefinedExpr *E) {
|
||||||
|
EmitAggLoadOfLValue(E);
|
||||||
|
}
|
||||||
|
|
||||||
void VisitBlockDeclRefExpr(const BlockDeclRefExpr *E)
|
|
||||||
{ EmitAggLoadOfLValue(E); }
|
|
||||||
|
|
||||||
// Operators.
|
// Operators.
|
||||||
// case Expr::UnaryOperatorClass:
|
// case Expr::UnaryOperatorClass:
|
||||||
// case Expr::CastExprClass:
|
// case Expr::CastExprClass:
|
||||||
|
|
|
@ -94,3 +94,8 @@ struct s6 { int f0; };
|
||||||
int f6(int a0, struct s6 a1, struct s6 a2) {
|
int f6(int a0, struct s6 a1, struct s6 a2) {
|
||||||
return (a0 ? a1 : a2).f0;
|
return (a0 ? a1 : a2).f0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PR4026
|
||||||
|
void f7() {
|
||||||
|
__func__;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue