From: Ted Kremenek Date: Tue, 26 Feb 2008 21:57:11 +0000 (+0000) Subject: Changed VarDecl::hasGlobalStorage() to be the negation of hasLocalStorage(). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9cae51aa5027dfb57bf1cc6b5fd1bdcec632aa14;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47630 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index 82b8cacf95..7f7e3afa39 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -329,7 +329,7 @@ public: /// 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) {