[cfe-commits] r151412 - /cfe/trunk/lib/CodeGen/CodeGenTypes.cpp

Benjamin Kramer benny.kra at googlemail.com
Fri Feb 24 16:19:39 PST 2012


On 25.02.2012, at 01:12, Douglas Gregor <dgregor at apple.com> wrote:

> Author: dgregor
> Date: Fri Feb 24 18:06:47 2012
> New Revision: 151412
>
> URL: http://llvm.org/viewvc/llvm-project?rev=151412&view=rev
> Log:
> Simplify check per Eli's comment
>
> Modified:
>    cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
>
> Modified: cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenTypes.cpp?rev=151412&r1=151411&r2=151412&view=diff
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/CodeGenTypes.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CodeGenTypes.cpp Fri Feb 24 18:06:47 2012
> @@ -201,11 +201,8 @@
>   // convert it.  Note that getDefinition()==0 is not the same as !isDefinition.
>   // The exception is an enumeration type with a fixed underlying type; these
>   // can be converted even if they are forward declarations.
> -  if (TT->getDecl()->getDefinition() == 0 &&
> -      !(isa<EnumDecl>(TT->getDecl()) &&
> -        cast<EnumDecl>(TT->getDecl())->isFixed())) {
> +  if (TT->isIncompleteType())
>     return false;
> -  }

Comment needs an update now.

- Ben
>
>   // If this is an enum, then it is always safe to convert.
>   const RecordType *RT = dyn_cast<RecordType>(TT);
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list