]> granicus.if.org Git - clang/commitdiff
Fixed bug in VarDecl::hasAutoStorage: function parameters implicitly have
authorTed Kremenek <kremenek@apple.com>
Sat, 18 Aug 2007 04:59:12 +0000 (04:59 +0000)
committerTed Kremenek <kremenek@apple.com>
Sat, 18 Aug 2007 04:59:12 +0000 (04:59 +0000)
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

index f94e126cb52b470b2909c5993fd67450a6df2a92..f9b9f353215ba25c24c6be1115288df80eeced5f 100644 (file)
@@ -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