[cfe-commits] r90710 - in /cfe/trunk/lib: Parse/ParseDecl.cpp Parse/ParseDeclCXX.cpp Parse/ParseObjc.cpp Parse/Parser.cpp Sema/SemaDecl.cpp Sema/SemaInit.cpp Sema/SemaTemplate.cpp
Chris Lattner
sabre at nondot.org
Sun Dec 6 09:36:06 PST 2009
Author: lattner
Date: Sun Dec 6 11:36:05 2009
New Revision: 90710
URL: http://llvm.org/viewvc/llvm-project?rev=90710&view=rev
Log:
remove some extraneous syntax: sourceloc implicitly converts to sourcerange.
Modified:
cfe/trunk/lib/Parse/ParseDecl.cpp
cfe/trunk/lib/Parse/ParseDeclCXX.cpp
cfe/trunk/lib/Parse/ParseObjc.cpp
cfe/trunk/lib/Parse/Parser.cpp
cfe/trunk/lib/Sema/SemaDecl.cpp
cfe/trunk/lib/Sema/SemaInit.cpp
cfe/trunk/lib/Sema/SemaTemplate.cpp
Modified: cfe/trunk/lib/Parse/ParseDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=90710&r1=90709&r2=90710&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDecl.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDecl.cpp Sun Dec 6 11:36:05 2009
@@ -1616,7 +1616,7 @@
// Check for extraneous top-level semicolon.
if (Tok.is(tok::semi)) {
Diag(Tok, diag::ext_extra_struct_semi)
- << CodeModificationHint::CreateRemoval(SourceRange(Tok.getLocation()));
+ << CodeModificationHint::CreateRemoval(Tok.getLocation());
ConsumeToken();
continue;
}
@@ -1841,7 +1841,7 @@
!(getLang().C99 || getLang().CPlusPlus0x))
Diag(CommaLoc, diag::ext_enumerator_list_comma)
<< getLang().CPlusPlus
- << CodeModificationHint::CreateRemoval((SourceRange(CommaLoc)));
+ << CodeModificationHint::CreateRemoval(CommaLoc);
}
// Eat the }.
Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=90710&r1=90709&r2=90710&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Sun Dec 6 11:36:05 2009
@@ -954,7 +954,7 @@
if (IsVirtual) {
// Complain about duplicate 'virtual'
Diag(VirtualLoc, diag::err_dup_virtual)
- << CodeModificationHint::CreateRemoval(SourceRange(VirtualLoc));
+ << CodeModificationHint::CreateRemoval(VirtualLoc);
}
IsVirtual = true;
@@ -1349,7 +1349,7 @@
// Check for extraneous top-level semicolon.
if (Tok.is(tok::semi)) {
Diag(Tok, diag::ext_extra_struct_semi)
- << CodeModificationHint::CreateRemoval(SourceRange(Tok.getLocation()));
+ << CodeModificationHint::CreateRemoval(Tok.getLocation());
ConsumeToken();
continue;
}
Modified: cfe/trunk/lib/Parse/ParseObjc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseObjc.cpp?rev=90710&r1=90709&r2=90710&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseObjc.cpp (original)
+++ cfe/trunk/lib/Parse/ParseObjc.cpp Sun Dec 6 11:36:05 2009
@@ -942,7 +942,7 @@
// Check for extraneous top-level semicolon.
if (Tok.is(tok::semi)) {
Diag(Tok, diag::ext_extra_struct_semi)
- << CodeModificationHint::CreateRemoval(SourceRange(Tok.getLocation()));
+ << CodeModificationHint::CreateRemoval(Tok.getLocation());
ConsumeToken();
continue;
}
@@ -1507,7 +1507,7 @@
if (Tok.is(tok::semi)) {
if (ObjCImpDecl) {
Diag(Tok, diag::warn_semicolon_before_method_body)
- << CodeModificationHint::CreateRemoval(SourceRange(Tok.getLocation()));
+ << CodeModificationHint::CreateRemoval(Tok.getLocation());
}
ConsumeToken();
}
Modified: cfe/trunk/lib/Parse/Parser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/Parser.cpp?rev=90710&r1=90709&r2=90710&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/Parser.cpp (original)
+++ cfe/trunk/lib/Parse/Parser.cpp Sun Dec 6 11:36:05 2009
@@ -405,7 +405,7 @@
case tok::semi:
if (!getLang().CPlusPlus0x)
Diag(Tok, diag::ext_top_level_semi)
- << CodeModificationHint::CreateRemoval(SourceRange(Tok.getLocation()));
+ << CodeModificationHint::CreateRemoval(Tok.getLocation());
ConsumeToken();
// TODO: Invoke action for top-level semicolon.
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=90710&r1=90709&r2=90710&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Sun Dec 6 11:36:05 2009
@@ -2327,7 +2327,7 @@
Diag(D.getDeclSpec().getStorageClassSpecLoc(),
diag::err_static_out_of_line)
<< CodeModificationHint::CreateRemoval(
- SourceRange(D.getDeclSpec().getStorageClassSpecLoc()));
+ D.getDeclSpec().getStorageClassSpecLoc());
} else if (SC == VarDecl::None)
SC = VarDecl::Static;
}
@@ -2849,7 +2849,7 @@
// 'virtual' was specified outside of the class.
Diag(D.getDeclSpec().getVirtualSpecLoc(), diag::err_virtual_out_of_class)
<< CodeModificationHint::CreateRemoval(
- SourceRange(D.getDeclSpec().getVirtualSpecLoc()));
+ D.getDeclSpec().getVirtualSpecLoc());
} else {
// Okay: Add virtual to the method.
CXXRecordDecl *CurClass = cast<CXXRecordDecl>(DC);
@@ -2889,7 +2889,7 @@
Diag(D.getDeclSpec().getStorageClassSpecLoc(),
diag::err_static_out_of_line)
<< CodeModificationHint::CreateRemoval(
- SourceRange(D.getDeclSpec().getStorageClassSpecLoc()));
+ D.getDeclSpec().getStorageClassSpecLoc());
}
// Handle GNU asm-label extension (encoded as an attribute).
Modified: cfe/trunk/lib/Sema/SemaInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaInit.cpp?rev=90710&r1=90709&r2=90710&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaInit.cpp (original)
+++ cfe/trunk/lib/Sema/SemaInit.cpp Sun Dec 6 11:36:05 2009
@@ -637,8 +637,8 @@
if (T->isScalarType() && !TopLevelObject)
SemaRef.Diag(IList->getLocStart(), diag::warn_braces_around_scalar_init)
<< IList->getSourceRange()
- << CodeModificationHint::CreateRemoval(SourceRange(IList->getLocStart()))
- << CodeModificationHint::CreateRemoval(SourceRange(IList->getLocEnd()));
+ << CodeModificationHint::CreateRemoval(IList->getLocStart())
+ << CodeModificationHint::CreateRemoval(IList->getLocEnd());
}
void InitListChecker::CheckListElementTypes(InitListExpr *IList,
Modified: cfe/trunk/lib/Sema/SemaTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplate.cpp?rev=90710&r1=90709&r2=90710&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplate.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplate.cpp Sun Dec 6 11:36:05 2009
@@ -4373,8 +4373,7 @@
if (D.getDeclSpec().isInlineSpecified() && getLangOptions().CPlusPlus0x)
Diag(D.getDeclSpec().getInlineSpecLoc(),
diag::err_explicit_instantiation_inline)
- << CodeModificationHint::CreateRemoval(
- SourceRange(D.getDeclSpec().getInlineSpecLoc()));
+ <<CodeModificationHint::CreateRemoval(D.getDeclSpec().getInlineSpecLoc());
// FIXME: check for constexpr specifier.
More information about the cfe-commits
mailing list