[cfe-commits] r41162 - /cfe/trunk/include/clang/AST/Decl.h

Ted Kremenek kremenek at apple.com
Fri Aug 17 21:59:13 PDT 2007


Author: kremenek
Date: Fri Aug 17 23:59:12 2007
New Revision: 41162

URL: http://llvm.org/viewvc/llvm-project?rev=41162&view=rev
Log:
Fixed bug in VarDecl::hasAutoStorage: function parameters implicitly have
auto storage, but this routine would incorrectly return false.

Modified:
    cfe/trunk/include/clang/AST/Decl.h

Modified: cfe/trunk/include/clang/AST/Decl.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Decl.h?rev=41162&r1=41161&r2=41162&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Fri Aug 17 23:59:12 2007
@@ -157,7 +157,7 @@
   //  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





More information about the cfe-commits mailing list