Skip to content

Commit 7c30c5d

Browse files
synthesize TypeSourceInfo before passing into ActOnReflectExpr
1 parent 340d7c0 commit 7c30c5d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

clang/lib/Parse/ParseReflect.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ ExprResult Parser::ParseCXXReflectExpression(SourceLocation OpLoc) {
5050
return ExprError();
5151

5252
TypeSourceInfo *TSI = nullptr;
53+
QualType QT = Actions.GetTypeFromParser(TR.get(), &TSI);
54+
55+
if (QT.isNull())
56+
return ExprError();
57+
58+
if (!TSI)
59+
TSI = Actions.getASTContext().getTrivialTypeSourceInfo(QT, /*Loc=*/OpLoc);
5360

5461
return Actions.ActOnCXXReflectExpr(OpLoc, TSI);
5562
}

0 commit comments

Comments
 (0)