diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-12-12 07:25:49 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-12-12 07:25:49 +0000 |
commit | 7ca84af48ef9c079eedcabe7fe923fc842ea21ae (patch) | |
tree | 74006a4ba90e43ac0c60c58753ed68544ccd5802 /clang/test/SemaCXX/offsetof.cpp | |
parent | 9ad6ba37668979d4cc9b6004681241c16bf29d0f (diff) | |
download | bcm5719-llvm-7ca84af48ef9c079eedcabe7fe923fc842ea21ae.tar.gz bcm5719-llvm-7ca84af48ef9c079eedcabe7fe923fc842ea21ae.zip |
Suppress warnings and errors about certain uses of non-POD types (in
__builtin_offsetof, passing through an ellipsis) when we're in an
unevaluated context. This is the first part of the fix to PR5761,
which deals with the simple case of an unevaluated context.
llvm-svn: 91210
Diffstat (limited to 'clang/test/SemaCXX/offsetof.cpp')
-rw-r--r-- | clang/test/SemaCXX/offsetof.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/offsetof.cpp b/clang/test/SemaCXX/offsetof.cpp index e18987f11ad..bc7a707ee54 100644 --- a/clang/test/SemaCXX/offsetof.cpp +++ b/clang/test/SemaCXX/offsetof.cpp @@ -16,3 +16,5 @@ void f() { struct Base { int x; }; struct Derived : Base { int y; }; int o = __builtin_offsetof(Derived, x); // expected-warning{{offset of on non-POD type}} + +const int o2 = sizeof(__builtin_offsetof(Derived, x)); |