diff --git a/clang/include/clang/AST/TypeLoc.h b/clang/include/clang/AST/TypeLoc.h index 5aa13a5c53d4..29955d37a972 100644 --- a/clang/include/clang/AST/TypeLoc.h +++ b/clang/include/clang/AST/TypeLoc.h @@ -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);