diff options
-rw-r--r-- | clang/include/clang/AST/Type.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/include/clang/AST/Type.h b/clang/include/clang/AST/Type.h index 008b9149602..2f492bf9183 100644 --- a/clang/include/clang/AST/Type.h +++ b/clang/include/clang/AST/Type.h @@ -109,6 +109,12 @@ public: bool isRestrictQualified() const { return ThePtr & Restrict; } + + /// addConst/addVolatile/addRestrict - add the specified type qual to this + /// QualType. + void addConst() { ThePtr |= Const; } + void addVolatile() { ThePtr |= Volatile; } + void addRestrict() { ThePtr |= Restrict; } QualType getQualifiedType(unsigned TQs) const { return QualType(getTypePtr(), TQs); |