File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -19853,6 +19853,12 @@ static void DoMarkVarDeclReferenced(
19853
19853
// Re-set the member to trigger a recomputation of the dependence bits
19854
19854
// for the expression.
19855
19855
DRE->setDecl(DRE->getDecl());
19856
+ // The size of an incomplete array type can be updated by
19857
+ // instantiating the initializer. The DeclRefExpr's type should be
19858
+ // updated accordingly too, or users of it would be confused!
19859
+ //
19860
+ // FIXME: Do we need to recompute the type for all the Decls, as in
19861
+ // BuildDeclarationNameExpr?
19856
19862
if (SemaRef.Context.getAsIncompleteArrayType(DRE->getType()) &&
19857
19863
!SemaRef.Context.getAsIncompleteArrayType(Var->getType()))
19858
19864
DRE->setType(Var->getType());
You can’t perform that action at this time.
0 commit comments