diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-01-17 01:30:42 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-01-17 01:30:42 +0000 |
commit | 10876ef5714f95abf4f7cd271f288a811be370e9 (patch) | |
tree | 1b37adc55e48f9f7b045f876fc35f1e749ed448a /clang/lib/Parse/Parser.cpp | |
parent | c406cb73648483276b6c938ab5ff6812c3fbcad9 (diff) | |
download | bcm5719-llvm-10876ef5714f95abf4f7cd271f288a811be370e9.tar.gz bcm5719-llvm-10876ef5714f95abf4f7cd271f288a811be370e9.zip |
Implement C++11 semantics for [[noreturn]] attribute. This required splitting
it apart from [[gnu::noreturn]] / __attribute__((noreturn)), since their
semantics are not equivalent (for instance, we treat [[gnu::noreturn]] as
affecting the function type, whereas [[noreturn]] does not).
llvm-svn: 172691
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r-- | clang/lib/Parse/Parser.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index 759ab7f60cd..20e515d1026 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/lib/Parse/Parser.cpp @@ -944,7 +944,8 @@ Decl *Parser::ParseFunctionDefinition(ParsingDeclarator &D, if (Tok.isNot(tok::equal)) { AttributeList *DtorAttrs = D.getAttributes(); while (DtorAttrs) { - if (!IsThreadSafetyAttribute(DtorAttrs->getName()->getName())) { + if (!IsThreadSafetyAttribute(DtorAttrs->getName()->getName()) && + !DtorAttrs->isCXX11Attribute()) { Diag(DtorAttrs->getLoc(), diag::warn_attribute_on_function_definition) << DtorAttrs->getName()->getName(); } |