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

Douglas Gregor dgregor at apple.com
Thu Dec 15 09:21:01 PST 2011


On Dec 14, 2011, at 6:04 PM, Chandler Carruth wrote:

> 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.


It is weird. I've fixed it in r146659, thanks!

	- Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111215/748b948f/attachment.html>


More information about the cfe-commits mailing list