From 602f754796e00662445d58e1263d168f2b13490a 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41162 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 f94e126cb5..f9b9f35321 100644 --- a/include/clang/AST/Decl.h +++ b/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 -- 2.40.0