diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-01-27 20:28:01 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-01-27 20:28:01 +0000 |
commit | 8006e76b4edfffacb7946fa08ddad2996fe730b2 (patch) | |
tree | 0cf03fb15105d705726163273fa74f80ec503405 /clang/lib/AST/StmtPrinter.cpp | |
parent | a462f5cc073a5103850ca9508faa33bfb848a2f0 (diff) | |
download | bcm5719-llvm-8006e76b4edfffacb7946fa08ddad2996fe730b2.tar.gz bcm5719-llvm-8006e76b4edfffacb7946fa08ddad2996fe730b2.zip |
Implement the Microsoft __is_convertible_to type trait, modeling the
semantics after the C++0x is_convertible type trait. This
implementation is not 100% complete, because it allows access errors
to be hard errors (rather than just evaluating false).
Original patch by Steven Watanabe!
llvm-svn: 124425
Diffstat (limited to 'clang/lib/AST/StmtPrinter.cpp')
-rw-r--r-- | clang/lib/AST/StmtPrinter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp index 74429ce31df..201115c7eb9 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -1225,9 +1225,9 @@ static const char *getTypeTraitName(UnaryTypeTrait UTT) { static const char *getTypeTraitName(BinaryTypeTrait BTT) { switch (BTT) { - default: llvm_unreachable("Unknown binary type trait"); case BTT_IsBaseOf: return "__is_base_of"; case BTT_TypeCompatible: return "__builtin_types_compatible_p"; + case BTT_IsConvertibleTo: return "__is_convertible_to"; } return ""; } |