From 1dd467a111794453e4d97af9907cb29ea72c44e5 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 13 Feb 2009 22:48:27 +0000 Subject: [PATCH] Add VarDecl::hasExternalStorage (no functionality change). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64498 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/Decl.h | 6 ++++++ 1 file changed, 6 insertions(+) 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. -- 2.40.0