diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-05-06 06:48:52 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-05-06 06:48:52 +0000 |
commit | 9ee9b9e17b10ebd599850bfc65e088d9da839a57 (patch) | |
tree | eee1e50fbd5084245e8784a6f20fc492da41fbf0 /include/clang/Basic/Builtins.h | |
parent | e539c80b7c1a54b4df0cc53999e676ab4f14271f (diff) |
[C++11] Use 'nullptr'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208063 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/Builtins.h')
-rw-r--r-- | include/clang/Basic/Builtins.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/include/clang/Basic/Builtins.h b/include/clang/Basic/Builtins.h index fd8fd422b1..f9d30e4056 100644 --- a/include/clang/Basic/Builtins.h +++ b/include/clang/Basic/Builtins.h @@ -94,53 +94,53 @@ public: /// \brief Return true if this function has no side effects and doesn't /// read memory. bool isConst(unsigned ID) const { - return strchr(GetRecord(ID).Attributes, 'c') != 0; + return strchr(GetRecord(ID).Attributes, 'c') != nullptr; } /// \brief Return true if we know this builtin never throws an exception. bool isNoThrow(unsigned ID) const { - return strchr(GetRecord(ID).Attributes, 'n') != 0; + return strchr(GetRecord(ID).Attributes, 'n') != nullptr; } /// \brief Return true if we know this builtin never returns. bool isNoReturn(unsigned ID) const { - return strchr(GetRecord(ID).Attributes, 'r') != 0; + return strchr(GetRecord(ID).Attributes, 'r') != nullptr; } /// \brief Return true if we know this builtin can return twice. bool isReturnsTwice(unsigned ID) const { - return strchr(GetRecord(ID).Attributes, 'j') != 0; + return strchr(GetRecord(ID).Attributes, 'j') != nullptr; } /// \brief Returns true if this builtin does not perform the side-effects /// of its arguments. bool isUnevaluated(unsigned ID) const { - return strchr(GetRecord(ID).Attributes, 'u') != 0; + return strchr(GetRecord(ID).Attributes, 'u') != nullptr; } /// \brief Return true if this is a builtin for a libc/libm function, /// with a "__builtin_" prefix (e.g. __builtin_abs). bool isLibFunction(unsigned ID) const { - return strchr(GetRecord(ID).Attributes, 'F') != 0; + return strchr(GetRecord(ID).Attributes, 'F') != nullptr; } /// \brief Determines whether this builtin is a predefined libc/libm /// function, such as "malloc", where we know the signature a /// priori. bool isPredefinedLibFunction(unsigned ID) const { - return strchr(GetRecord(ID).Attributes, 'f') != 0; + return strchr(GetRecord(ID).Attributes, 'f') != nullptr; } /// \brief Determines whether this builtin is a predefined compiler-rt/libgcc /// function, such as "__clear_cache", where we know the signature a /// priori. bool isPredefinedRuntimeFunction(unsigned ID) const { - return strchr(GetRecord(ID).Attributes, 'i') != 0; + return strchr(GetRecord(ID).Attributes, 'i') != nullptr; } /// \brief Determines whether this builtin has custom typechecking. bool hasCustomTypechecking(unsigned ID) const { - return strchr(GetRecord(ID).Attributes, 't') != 0; + return strchr(GetRecord(ID).Attributes, 't') != nullptr; } /// \brief Completely forget that the given ID was ever considered a builtin, @@ -168,7 +168,7 @@ public: /// /// Such functions can be const when the MathErrno lang option is disabled. bool isConstWithoutErrno(unsigned ID) const { - return strchr(GetRecord(ID).Attributes, 'e') != 0; + return strchr(GetRecord(ID).Attributes, 'e') != nullptr; } private: |