]> granicus.if.org Git - clang/commitdiff
remove the last couple obsolete forms of Parser::Diag.
authorChris Lattner <sabre@nondot.org>
Tue, 18 Nov 2008 07:50:21 +0000 (07:50 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 18 Nov 2008 07:50:21 +0000 (07:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59510 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Parse/Parser.h
lib/Parse/ParseObjc.cpp
lib/Parse/ParseTentative.cpp
lib/Parse/Parser.cpp

index e6d7df5d37f43e17b8ada7377a0d0e74d944a497..3beb36c7af99c0e9437b36f52ad2bfa8d4ed5cff 100644 (file)
@@ -315,9 +315,6 @@ private:
     
   DiagnosticInfo Diag(SourceLocation Loc, unsigned DiagID);
   DiagnosticInfo Diag(const Token &Tok, unsigned DiagID);
-  bool Diag(SourceLocation Loc, unsigned DiagID, const SourceRange &R);
-  bool Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg,
-            const SourceRange& R1);
   
   /// SkipUntil - Read tokens until we get to the specified token, then consume
   /// it (unless DontConsume is true).  Because we cannot guarantee that the
index 45ce3e1d928afeccbb295b4c1c8b195824a2a562..b228d2a46f7df1843ac92db215702d563464f390 100644 (file)
@@ -319,8 +319,8 @@ void Parser::ParseObjCInterfaceDeclList(DeclTy *interfaceDecl,
       for (unsigned i = 0, e = FieldDeclarators.size(); i != e; ++i) {
         FieldDeclarator &FD = FieldDeclarators[i];
         if (FD.D.getIdentifier() == 0) {
-          Diag(AtLoc, diag::err_objc_property_requires_field_name,
-               FD.D.getSourceRange());
+          Diag(AtLoc, diag::err_objc_property_requires_field_name)
+            << FD.D.getSourceRange();
           continue;
         }
         
index 4f6f117f2a9fbf2cf02e1d11408e2accc6c84c96..ccaae6d3b250271568ec86f8dbe6a9a47aa2e8be 100644 (file)
@@ -130,12 +130,12 @@ bool Parser::isCXXSimpleDeclaration() {
     // We have a declaration that looks like a functional cast; there's a high
     // chance that the author intended the statement to be an expression.
     // Emit a warning.
-    Diag(Tok.getLocation(), diag::warn_statement_disambiguation,
-      "declaration", SourceRange(Tok.getLocation(), TentativeParseLoc));
+    Diag(Tok, diag::warn_statement_disambiguation)
+      << "declaration" << SourceRange(Tok.getLocation(), TentativeParseLoc);
   } else if (TPR == TPResult::False() && Tok.is(tok::kw_void)) {
     // A functional cast to 'void' expression ? Warning..
-    Diag(Tok.getLocation(), diag::warn_statement_disambiguation,
-      "expression", SourceRange(Tok.getLocation(), TentativeParseLoc));
+    Diag(Tok, diag::warn_statement_disambiguation)
+      << "expression" << SourceRange(Tok.getLocation(), TentativeParseLoc);
   }
 
   return TPR == TPResult::True();
@@ -750,8 +750,8 @@ bool Parser::isCXXFunctionDeclarator(bool warnIfAmbiguous) {
     // Function declarator has precedence over constructor-style initializer.
     // Emit a warning just in case the author intended a variable definition.
     if (warnIfAmbiguous)
-      Diag(Tok.getLocation(), diag::warn_parens_disambiguated_as_function_decl,
-           SourceRange(Tok.getLocation(), TPLoc));
+      Diag(Tok, diag::warn_parens_disambiguated_as_function_decl)
+        << SourceRange(Tok.getLocation(), TPLoc);
     return true;
   }
 
index d0d1871829e6cae9e01bbd64d9a2ee24b32c2686..168e2f556f72ceda6965225c961ebd4fa2031cc3 100644 (file)
@@ -49,18 +49,6 @@ DiagnosticInfo Parser::Diag(const Token &Tok, unsigned DiagID) {
   return Diag(Tok.getLocation(), DiagID);
 }
 
-bool Parser::Diag(SourceLocation Loc, unsigned DiagID, const std::string &Msg,
-                  const SourceRange& Range) {
-  Diags.Report(PP.getFullLoc(Loc), DiagID) << Msg << Range;
-  return true;
-}
-
-bool Parser::Diag(SourceLocation Loc, unsigned DiagID, const SourceRange &R) {
-  Diags.Report(FullSourceLoc(Loc,PP.getSourceManager()), DiagID) << R;
-  return true;
-}
-
-
 /// MatchRHSPunctuation - For punctuation with a LHS and RHS (e.g. '['/']'),
 /// this helper function matches and consumes the specified RHS token if
 /// present.  If not present, it emits the specified diagnostic indicating