]> granicus.if.org Git - clang/commitdiff
add some helpers
authorChris Lattner <sabre@nondot.org>
Tue, 7 Aug 2007 17:33:34 +0000 (17:33 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 7 Aug 2007 17:33:34 +0000 (17:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40901 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Type.h

index 008b914960272c4b3ef2e88837d3d7eb46935740..2f492bf918316553fd3659172806f755985b6403 100644 (file)
@@ -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);