Skip to content

Commit 04e350f

Browse files
committed
Add comment
1 parent 34632d0 commit 04e350f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

clang/lib/Sema/SemaExpr.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19853,6 +19853,12 @@ static void DoMarkVarDeclReferenced(
1985319853
// Re-set the member to trigger a recomputation of the dependence bits
1985419854
// for the expression.
1985519855
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?
1985619862
if (SemaRef.Context.getAsIncompleteArrayType(DRE->getType()) &&
1985719863
!SemaRef.Context.getAsIncompleteArrayType(Var->getType()))
1985819864
DRE->setType(Var->getType());

0 commit comments

Comments
 (0)