[cfe-commits] r64498 - /cfe/trunk/include/clang/AST/Decl.h

Daniel Dunbar daniel at zuster.org
Fri Feb 13 14:48:27 PST 2009


Author: ddunbar
Date: Fri Feb 13 16:48:27 2009
New Revision: 64498

URL: http://llvm.org/viewvc/llvm-project?rev=64498&view=rev
Log:
Add VarDecl::hasExternalStorage (no functionality change).

Modified:
    cfe/trunk/include/clang/AST/Decl.h

Modified: cfe/trunk/include/clang/AST/Decl.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Decl.h?rev=64498&r1=64497&r2=64498&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Fri Feb 13 16:48:27 2009
@@ -306,6 +306,12 @@
     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.





More information about the cfe-commits mailing list