[cfe-commits] r146613 - /cfe/trunk/include/clang/AST/DeclBase.h

Chandler Carruth chandlerc at google.com
Wed Dec 14 18:04:18 PST 2011


On Wed, Dec 14, 2011 at 3:59 PM, Douglas Gregor <dgregor at apple.com> wrote:

> +/// \brief Determine whether two declarations declare the same entity.
> +inline bool declaresSameEntity(const Decl *D1, const Decl *D2) {
> +  if (D1 == D2)
> +    return true;
> +
> +  if (!D1 || !D2)
> +    return false;
>

I find this very surprising. I would expect either being NULL to always
return false... Was this intentional? If so, I would comment about it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111214/78c8f797/attachment.html>


More information about the cfe-commits mailing list