diff options
| author | Douglas Gregor <dgregor@apple.com> | 2011-04-28 15:48:45 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2011-04-28 15:48:45 +0000 |
| commit | 068730992cf08d7d7e82e7bb147d85f429fc3ddd (patch) | |
| tree | 4138757526cf883ca3d329ada33f23ea518793c9 /clang/test | |
| parent | 4af23c81592ce67b1aecde8e58ab1c49a04b3307 (diff) | |
| download | bcm5719-llvm-068730992cf08d7d7e82e7bb147d85f429fc3ddd.tar.gz bcm5719-llvm-068730992cf08d7d7e82e7bb147d85f429fc3ddd.zip | |
libstdc++ 4.4 uses __is_signed as an identifier, while Clang treats it
as a keyword for the __is_signed type trait. Cope with this conflict
via some hackish recovery: if we see a declaration of the form
static const bool __is_signed
then we stop treating __is_signed as a keyword and instead treat it as
an identifier. It's ugly, but it's better than making the __is_signed
type trait conditional on some language flag. Fixes PR9804.
llvm-svn: 130399
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/SemaCXX/libstdcxx_is_pod_hack.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/libstdcxx_is_pod_hack.cpp b/clang/test/SemaCXX/libstdcxx_is_pod_hack.cpp index 2e920321953..3cc476dc289 100644 --- a/clang/test/SemaCXX/libstdcxx_is_pod_hack.cpp +++ b/clang/test/SemaCXX/libstdcxx_is_pod_hack.cpp @@ -11,3 +11,12 @@ struct __is_pod { }; __is_pod<int> ipi; + +// Another, similar egregious hack for __is_signed, which is a type +// trait in Embarcadero's compiler but is used as an identifier in +// libstdc++. +struct test_is_signed { + static const bool __is_signed = true; +}; + +bool check_signed = test_is_signed::__is_signed; |

