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

Ted Kremenek kremenek at apple.com
Tue Feb 26 13:57:20 PST 2008


Author: kremenek
Date: Tue Feb 26 15:57:11 2008
New Revision: 47630

URL: http://llvm.org/viewvc/llvm-project?rev=47630&view=rev
Log:
Changed VarDecl::hasGlobalStorage() to be the negation of hasLocalStorage().
Before it was the negation of hasAutoStorage(), which is incorrect. 
"Register" storage for Decls do not indicate global variables.

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=47630&r1=47629&r2=47630&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Tue Feb 26 15:57:11 2008
@@ -329,7 +329,7 @@
   /// 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.
-  bool hasGlobalStorage() const { return !hasAutoStorage(); }
+  bool hasGlobalStorage() const { return !hasLocalStorage(); }
   
   // Implement isa/cast/dyncast/etc.
   static bool classof(const Decl *D) {





More information about the cfe-commits mailing list