llvm-project/clang/utils/ABITest
Douglas Gregor a71cc15361 Implement promotion for enumeration types.
WHAT!?!

It turns out that Type::isPromotableIntegerType() was not considering
enumeration types to be promotable, so we would never do the
promotion despite having properly computed the promotion type when the
enum was defined. Various operations on values of enum type just
"worked" because we could still compute the integer rank of an enum
type; the oddity, however, is that operations such as "add an enum and
an unsigned" would often have an enum result type (!). The bug
actually showed up as a spurious -Wformat diagnostic
(<rdar://problem/7595366>), but in theory it could cause miscompiles.

In this commit:
  - Enum types with a promotion type of "int" or "unsigned int" are
  promotable.
  - Tweaked the computation of promotable types for enums
  - For all of the ABIs, treat enum types the same way as their
  underlying types (*not* their promotion types) for argument passing
  and return values
  - Extend the ABI tester with support for enumeration types

llvm-svn: 95117
2010-02-02 20:10:50 +00:00
..
layout Whoops, did not mean to commit this 2009-08-16 20:29:59 +00:00
return-types-32 ABITest: Move more of the common Makefile bits into the common 2009-05-08 22:49:52 +00:00
return-types-64 ABITest: Move more of the common Makefile bits into the common 2009-05-08 22:49:52 +00:00
single-args-32 ABITest: Move more of the common Makefile bits into the common 2009-05-08 22:49:52 +00:00
single-args-64 ABITest: Move more of the common Makefile bits into the common 2009-05-08 22:49:52 +00:00
ABITestGen.py Implement promotion for enumeration types. 2010-02-02 20:10:50 +00:00
Enumeration.py Add utils/ABITest, my ABI test generation tool. 2009-01-15 04:24:17 +00:00
Makefile.test.common Minor build system changes to make ABITest work correctly on Linux. 2009-05-25 22:07:09 +00:00
TypeGen.py Implement promotion for enumeration types. 2010-02-02 20:10:50 +00:00
build-and-summarize-all.sh Add various other bits I use to run ABITest. 2009-05-08 00:49:21 +00:00
build-and-summarize.sh Add various other bits I use to run ABITest. 2009-05-08 00:49:21 +00:00
build.sh Minor build system changes to make ABITest work correctly on Linux. 2009-05-25 22:07:09 +00:00
summarize.sh Minor build system changes to make ABITest work correctly on Linux. 2009-05-25 22:07:09 +00:00