Misc fixes for -Wreorder:
authorEli Friedman <eli.friedman@gmail.com>
Tue, 21 Jul 2009 19:28:10 +0000 (19:28 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Tue, 21 Jul 2009 19:28:10 +0000 (19:28 +0000)
commit952c15dd52a004861edea256479ad80de3148263
treee920b3d3cb21c138d1b8fdf5de053ecc9646c496
parentc9ec735aa8871078ca9d9b53f1131103fc1a41b5
Misc fixes for -Wreorder:

1. Make it work correctly with anonymous unions.
2. Don't compute it if the warning isn't enabled.
3. Optimize the algorithm slightly to make it linear time in the
case where we don't produce any warnings.

llvm-svn: 76630
clang/lib/Sema/SemaDeclCXX.cpp
clang/test/SemaCXX/warn-reorder-ctor-initialization.cpp