Fix <rdar://problem/6704086> by allowing the format string checking in Sema to
allow non-literal format strings that are variables that (a) permanently bind to
a string constant and (b) whose string constants are resolvable within the same
translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67404 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index 19212a3..321ccf3 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -281,7 +281,7 @@
           (getStorageClass() == None || getStorageClass() == Static));
 }
 
-const Expr *VarDecl::getDefinition(const VarDecl *&Def) {
+const Expr *VarDecl::getDefinition(const VarDecl *&Def) const {
   Def = this;
   while (Def && !Def->getInit())
     Def = Def->getPreviousDeclaration();