> > Here's a simple patch that fixes a bug in VarDecl::getSourceRange() which > > occurs when a static member array has an element type with an implicit > > initializer expression. > > > > Basically, this detect the edge case where the initializer has no size > and > > falls back on the usual DeclaratorDecl::getSourceRange() allowing any > > postfix tokens to be included in the range calculation. > > > > All tests passed locally, but I'm afraid I didn't have a chance to > construct > > a suitable test-case. However the following snippet reproduces the issue > if > > needed. Either way I hope this should be safe to commit. > > All changes should have an associated test case (where possible). > Please also add a comment, this is pretty subtle!
Sorry for the delay, only just had a chance to knock up the patch and test case (attached). Let me know if it fits the bill. - Will.
static-member-array-source-range-fix.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
