rsmith requested changes to this revision.
rsmith added a comment.
This revision now requires changes to proceed.

No, absolutely not. This would be insanely expensive, and marks entirely 
unrelated things "used".

The right thing to do here is to consistently track both the named declaration 
(the one found by name lookup, which might be a using-declaration) and the 
ultimately selected declaration (which might be the target of the 
using-declaration, or if that declaration is a template, a specialization of 
that template), and pass both to `MarkAnyDeclUsed`. Then we should mark the 
named declaration as `Referenced` and the selected declaration as `Used`. (The 
"unused using-declaration" warning should be based on the `Referenced` bit, 
since it's not meaningful to odr-use a using-declaration.)


Repository:
  rC Clang

https://reviews.llvm.org/D46190



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D46190: F... Carlos Alberto Enciso via Phabricator via cfe-commits
    • [PATCH] D461... Carlos Alberto Enciso via Phabricator via cfe-commits
    • [PATCH] D461... Richard Smith - zygoloid via Phabricator via cfe-commits
    • [PATCH] D461... Richard Smith - zygoloid via Phabricator via cfe-commits
    • [PATCH] D461... Carlos Alberto Enciso via Phabricator via cfe-commits
    • [PATCH] D461... Carlos Alberto Enciso via Phabricator via cfe-commits
    • [PATCH] D461... Richard Smith - zygoloid via Phabricator via cfe-commits
    • [PATCH] D461... Carlos Alberto Enciso via Phabricator via cfe-commits
    • [PATCH] D461... Carlos Alberto Enciso via Phabricator via cfe-commits
    • [PATCH] D461... Carlos Alberto Enciso via Phabricator via cfe-commits
    • [PATCH] D461... Carlos Alberto Enciso via Phabricator via cfe-commits

Reply via email to