[cfe-commits] r59510 - in /cfe/trunk: include/clang/Parse/Parser.h lib/Parse/ParseObjc.cpp lib/Parse/ParseTentative.cpp lib/Parse/Parser.cpp
Chris Lattner
sabre at nondot.org
Mon Nov 17 23:50:22 PST 2008
Author: lattner
Date: Tue Nov 18 01:50:21 2008
New Revision: 59510
URL: http://llvm.org/viewvc/llvm-project?rev=59510&view=rev
Log:
remove the last couple obsolete forms of Parser::Diag.
Modified:
cfe/trunk/include/clang/Parse/Parser.h
cfe/trunk/lib/Parse/ParseObjc.cpp
cfe/trunk/lib/Parse/ParseTentative.cpp
cfe/trunk/lib/Parse/Parser.cpp
Modified: cfe/trunk/include/clang/Parse/Parser.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Parser.h?rev=59510&r1=59509&r2=59510&view=diff
==============================================================================
--- cfe/trunk/include/clang/Parse/Parser.h (original)
+++ cfe/trunk/include/clang/Parse/Parser.h Tue Nov 18 01:50:21 2008
@@ -315,9 +315,6 @@
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
Modified: cfe/trunk/lib/Parse/ParseObjc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseObjc.cpp?rev=59510&r1=59509&r2=59510&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseObjc.cpp (original)
+++ cfe/trunk/lib/Parse/ParseObjc.cpp Tue Nov 18 01:50:21 2008
@@ -319,8 +319,8 @@
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;
}
Modified: cfe/trunk/lib/Parse/ParseTentative.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseTentative.cpp?rev=59510&r1=59509&r2=59510&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseTentative.cpp (original)
+++ cfe/trunk/lib/Parse/ParseTentative.cpp Tue Nov 18 01:50:21 2008
@@ -130,12 +130,12 @@
// 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 @@
// 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;
}
Modified: cfe/trunk/lib/Parse/Parser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/Parser.cpp?rev=59510&r1=59509&r2=59510&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/Parser.cpp (original)
+++ cfe/trunk/lib/Parse/Parser.cpp Tue Nov 18 01:50:21 2008
@@ -49,18 +49,6 @@
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
More information about the cfe-commits
mailing list