aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-02-26 21:57:11 +0000
committerTed Kremenek <kremenek@apple.com>2008-02-26 21:57:11 +0000
commit9cae51aa5027dfb57bf1cc6b5fd1bdcec632aa14 (patch)
treed59ead39ff40055290a3061bc77b163cb533c3f1
parent813733577d33ec56479667b49e1bff42dc6bba90 (diff)
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
-rw-r--r--include/clang/AST/Decl.h2
1 files changed, 1 insertions, 1 deletions
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) {