From 9cae51aa5027dfb57bf1cc6b5fd1bdcec632aa14 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 26 Feb 2008 21:57:11 +0000 Subject: [PATCH] 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 --- include/clang/AST/Decl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.50.1