]> granicus.if.org Git - clang/commitdiff
CXXMethodDecl::isConst() and CXXMethodDecl::isVolatile() can be const methods
authorArnaud A. de Grandmaison <arnaud.adegm@gmail.com>
Tue, 9 Oct 2012 07:09:56 +0000 (07:09 +0000)
committerArnaud A. de Grandmaison <arnaud.adegm@gmail.com>
Tue, 9 Oct 2012 07:09:56 +0000 (07:09 +0000)
Patch by: Laszlo Nagy

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165486 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/DeclCXX.h

index 26f91dd42db5be0299628028dd4c6107f9f42a4d..e06246c87d55e87f7aa5988d75cbfed3219067ba 100644 (file)
@@ -1558,8 +1558,8 @@ public:
   bool isStatic() const { return getStorageClass() == SC_Static; }
   bool isInstance() const { return !isStatic(); }
 
-  bool isConst() { return getType()->castAs<FunctionType>()->isConst(); }
-  bool isVolatile() { return getType()->castAs<FunctionType>()->isVolatile(); }
+  bool isConst() const { return getType()->castAs<FunctionType>()->isConst(); }
+  bool isVolatile() const { return getType()->castAs<FunctionType>()->isVolatile(); }
 
   bool isVirtual() const {
     CXXMethodDecl *CD =