aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/Type.h
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-01-17 01:30:42 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-01-17 01:30:42 +0000
commitcd8ab51a44e80625d84126780b0d85a7732e25af (patch)
treeeb8a9f189b8553a98c361192ddb816b8f1703d5c /include/clang/AST/Type.h
parent6c3af3d0e3e65bcbca57bfd458d684941f6d0531 (diff)
downloadclang-cd8ab51a44e80625d84126780b0d85a7732e25af.tar.gz
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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172691 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/Type.h')
-rw-r--r--include/clang/AST/Type.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h
index 2f1b48eb0f..f1db761557 100644
--- a/include/clang/AST/Type.h
+++ b/include/clang/AST/Type.h
@@ -2706,6 +2706,9 @@ public:
bool getHasRegParm() const { return getExtInfo().getHasRegParm(); }
unsigned getRegParmType() const { return getExtInfo().getRegParm(); }
+ /// \brief Determine whether this function type includes the GNU noreturn
+ /// attribute. The C++11 [[noreturn]] attribute does not affect the function
+ /// type.
bool getNoReturnAttr() const { return getExtInfo().getNoReturn(); }
CallingConv getCallConv() const { return getExtInfo().getCC(); }
ExtInfo getExtInfo() const { return ExtInfo(FunctionTypeBits.ExtInfo); }