[cfe-commits] [Patch] Fix up self reference visitor

Richard Trieu rtrieu at google.com
Fri Sep 28 19:44:50 PDT 2012


Do a little cleaning for the self reference visitor.
-Allow Sema to do more processing on the initial Expr before checking it.
-Remove the special conditions in HandleExpr()
-Move the code so that only one call site is needed.
-Removed the function from Sema and only call it locally.
-Warn on potentially evaluated reference variables, not just those cast to
r-values.
-Update tests.

This new version will catch the following cases:
int &a(a);
int &a{a};
int a(a);
int a{a};
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120928/9a805093/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Self-Reference-Checker.patch
Type: application/octet-stream
Size: 9305 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120928/9a805093/attachment.obj>


More information about the cfe-commits mailing list