aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/Decl.h
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-03-07 02:00:27 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-03-07 02:00:27 +0000
commit531db82c6ecfb4772c6870731c06ad8718f1e0ce (patch)
tree9b3b0a08efc4622943ffe2aff900214f344b2dea /include/clang/AST/Decl.h
parent377830097aec41c0cd80ef5972b4e850b44afefd (diff)
Add a hasExternalLinkage helper. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176607 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/AST/Decl.h')
-rw-r--r--include/clang/AST/Decl.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h
index 68d7d56585..d969acd807 100644
--- a/include/clang/AST/Decl.h
+++ b/include/clang/AST/Decl.h
@@ -214,6 +214,11 @@ public:
/// \brief Determine what kind of linkage this entity has.
Linkage getLinkage() const;
+ /// \brief True if this decl has external linkage.
+ bool hasExternalLinkage() const {
+ return getLinkage() == ExternalLinkage;
+ }
+
/// \brief Determines the visibility of this entity.
Visibility getVisibility() const {
return getLinkageAndVisibility().getVisibility();