]> granicus.if.org Git - clang/commitdiff
Fix TypeLoc::operator bool().
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sat, 29 Aug 2009 22:39:19 +0000 (22:39 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sat, 29 Aug 2009 22:39:19 +0000 (22:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80447 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/TypeLoc.h

index 5aa13a5c53d4e946d16cb9955fee7354dfa9afa8..29955d37a972b0fd1cb5a2dbfa32e18e166fbc09 100644 (file)
@@ -38,7 +38,7 @@ public:
   TypeLoc() : Data(0) { }
 
   bool isNull() const { return Ty.isNull(); }
-  operator bool() const { return isNull(); }
+  operator bool() const { return !isNull(); }
 
   /// \brief Returns the size of type source info data block for the given type.
   static unsigned getFullDataSizeForType(QualType Ty);