diff options
| author | DeLesley Hutchins <delesley@google.com> | 2012-02-16 16:50:43 +0000 |
|---|---|---|
| committer | DeLesley Hutchins <delesley@google.com> | 2012-02-16 16:50:43 +0000 |
| commit | 3fc6e4a7cda90e816cb8213bea927c9067cb6424 (patch) | |
| tree | 38059a0c42e6faa08b340afa04f2f015c5ab052f /clang/test/SemaCXX/cxx0x-cursory-default-delete.cpp | |
| parent | 9bc9bcc2472373ab81a2106e5a04fc6037e19fcc (diff) | |
| download | bcm5719-llvm-3fc6e4a7cda90e816cb8213bea927c9067cb6424.tar.gz bcm5719-llvm-3fc6e4a7cda90e816cb8213bea927c9067cb6424.zip | |
Allow thread safety attributes on function definitions.
For compatibility with gcc, clang will now parse gcc attributes on
function definitions, but issue a warning if the attribute is not a
thread safety attribute. Warning controlled by -Wgcc-compat.
llvm-svn: 150698
Diffstat (limited to 'clang/test/SemaCXX/cxx0x-cursory-default-delete.cpp')
| -rw-r--r-- | clang/test/SemaCXX/cxx0x-cursory-default-delete.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/cxx0x-cursory-default-delete.cpp b/clang/test/SemaCXX/cxx0x-cursory-default-delete.cpp index 17933c2f009..32905956169 100644 --- a/clang/test/SemaCXX/cxx0x-cursory-default-delete.cpp +++ b/clang/test/SemaCXX/cxx0x-cursory-default-delete.cpp @@ -67,3 +67,9 @@ struct except_spec_d_mismatch : except_spec_a, except_spec_b { struct except_spec_d_match : except_spec_a, except_spec_b { except_spec_d_match() throw(A, B) = default; }; + +// gcc-compatibility: allow attributes on default definitions +// (but not normal definitions) +struct S { S(); }; +S::S() __attribute((pure)) = default; + |

