aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-02-13 22:48:27 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-02-13 22:48:27 +0000
commit1dd467a111794453e4d97af9907cb29ea72c44e5 (patch)
treebdb15fa666dd78c7d37dd5a7ac3e36b1709e1dc3
parent40e60c27d09d0561cd3ab41c332e3b0838e899dd (diff)
Add VarDecl::hasExternalStorage (no functionality change).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64498 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/AST/Decl.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h
index 1ea015066c..ac4b630f18 100644
--- a/include/clang/AST/Decl.h
+++ b/include/clang/AST/Decl.h
@@ -306,6 +306,12 @@ public:
return getStorageClass() <= Register;
}
+ /// hasExternStorage - Returns true if a variable has extern or
+ /// __private_extern__ storage.
+ bool hasExternalStorage() const {
+ return getStorageClass() == Extern || getStorageClass() == PrivateExtern;
+ }
+
/// hasGlobalStorage - Returns true for all variables that do not
/// have local storage. This includs all global variables as well
/// as static variables declared within a function.