]> granicus.if.org Git - clang/commitdiff
Sema: Qualify getPrintable's Expr argument
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 26 Dec 2014 06:06:56 +0000 (06:06 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 26 Dec 2014 06:06:56 +0000 (06:06 +0000)
getPrintable has an overload which takes a bool.  This means that const
qualified Exprs would get forwarded to the bool overload instead of the
Expr overload.

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

include/clang/Sema/Sema.h

index 39f8e669a63cd6fedebd0966a5c8acd0d8d5405a..95fc68fbc1358cd30899d243c20275e3ceda55bf 100644 (file)
@@ -1251,7 +1251,7 @@ public:
   static QualType getPrintable(QualType T) { return T; }
   static SourceRange getPrintable(SourceRange R) { return R; }
   static SourceRange getPrintable(SourceLocation L) { return L; }
-  static SourceRange getPrintable(Expr *E) { return E->getSourceRange(); }
+  static SourceRange getPrintable(const Expr *E) { return E->getSourceRange(); }
   static SourceRange getPrintable(TypeLoc TL) { return TL.getSourceRange();}
 
   template<typename T1>