From 8b8215a048169cf25537ca7873ea5937bbd4b963 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Sat, 18 Aug 2007 04:59:12 +0000 Subject: [PATCH] Fixed bug in VarDecl::hasAutoStorage: function parameters implicitly have auto storage, but this routine would incorrectly return false. llvm-svn: 41162 --- clang/include/clang/AST/Decl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h index f94e126cb52b..f9b9f353215b 100644 --- a/clang/include/clang/AST/Decl.h +++ b/clang/include/clang/AST/Decl.h @@ -157,7 +157,7 @@ public: // implicitly "auto", but are represented internally with a storage // class of None. bool hasAutoStorage() { - return (SClass == Auto || (SClass == None && getKind() == BlockVariable)); + return (SClass == Auto || (SClass == None && getKind() != FileVariable)); } // hasStaticStorage - Returns true if either the implicit or