[cfe-commits] r111512 - in /cfe/trunk: lib/AST/Type.cpp test/Sema/enum.c test/SemaCXX/enum.cpp
Douglas Gregor
dgregor at apple.com
Thu Aug 19 09:54:54 PDT 2010
On Aug 18, 2010, at 9:39 PM, Eli Friedman wrote:
> Author: efriedma
> Date: Wed Aug 18 23:39:37 2010
> New Revision: 111512
>
> URL: http://llvm.org/viewvc/llvm-project?rev=111512&view=rev
> Log:
> Fix for PR7911 and PR7921: make isIntegralOrEnumerationType return false
> for incomplete enum types. An incomplete enum can't really be treated as
> an "integral or enumeration" type, and the incorrect treatment leads to
> bad behavior for many callers.
>
> This makes isIntegralOrEnumerationType equivalent to isIntegerType; I think
> we should globally replace the latter with the former; thoughts?
I was actually planning on going the other way. The term "integer type" (or "integral type") is ambiguous in Clang, because C and C++ have different definitions: C includes enum types, C++ does not. I find the C++ definition to be more intuitive, hence the introduction of the less-confusing isIntegralOrEnumerationType.
- Doug
More information about the cfe-commits
mailing list