]> granicus.if.org Git - clang/commitdiff
Add VarDecl::hasExternalStorage (no functionality change).
authorDaniel Dunbar <daniel@zuster.org>
Fri, 13 Feb 2009 22:48:27 +0000 (22:48 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 13 Feb 2009 22:48:27 +0000 (22:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64498 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Decl.h

index 1ea015066c5bacbe3ac716d4c60dc6ad41a3942b..ac4b630f1849f87c490b14880dd30437219e354d 100644 (file)
@@ -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.