aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-23 23:12:31 +0000
committerChris Lattner <sabre@nondot.org>2008-11-23 23:12:31 +0000
commit5f4a6829dc58cab2f76e2b98492859aa3b91e3f2 (patch)
treec2c13ad4ad80fdb53222315c85fa883abf36becc /lib/Sema/SemaStmt.cpp
parentb8b96aff63e24ff1509f112de871f697aaea55f9 (diff)
Make all the 'redefinition' diagnostics more consistent, and make the
"previously defined here" diagnostics all notes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59920 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r--lib/Sema/SemaStmt.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index 204d161f56..8cd223fc39 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -195,7 +195,7 @@ Sema::ActOnLabelStmt(SourceLocation IdentLoc, IdentifierInfo *II,
// multiply defined, reject it now.
if (LabelDecl->getSubStmt()) {
Diag(IdentLoc, diag::err_redefinition_of_label) << LabelDecl->getID();
- Diag(LabelDecl->getIdentLoc(), diag::err_previous_definition);
+ Diag(LabelDecl->getIdentLoc(), diag::note_previous_definition);
return SubStmt;
}
@@ -390,7 +390,7 @@ Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, StmtTy *Switch,
if (DefaultStmt *DS = dyn_cast<DefaultStmt>(SC)) {
if (TheDefaultStmt) {
Diag(DS->getDefaultLoc(), diag::err_multiple_default_labels_defined);
- Diag(TheDefaultStmt->getDefaultLoc(), diag::err_first_label);
+ Diag(TheDefaultStmt->getDefaultLoc(), diag::note_duplicate_case_prev);
// FIXME: Remove the default statement from the switch block so that
// we'll return a valid AST. This requires recursing down the
@@ -436,7 +436,7 @@ Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, StmtTy *Switch,
Diag(CaseVals[i+1].second->getLHS()->getLocStart(),
diag::err_duplicate_case) << CaseVals[i].first.toString(10);
Diag(CaseVals[i].second->getLHS()->getLocStart(),
- diag::err_duplicate_case_prev);
+ diag::note_duplicate_case_prev);
// FIXME: We really want to remove the bogus case stmt from the substmt,
// but we have no way to do this right now.
CaseListIsErroneous = true;
@@ -520,7 +520,7 @@ Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, StmtTy *Switch,
Diag(CR->getLHS()->getLocStart(), diag::err_duplicate_case)
<< OverlapVal.toString(10);
Diag(OverlapStmt->getLHS()->getLocStart(),
- diag::err_duplicate_case_prev);
+ diag::note_duplicate_case_prev);
// FIXME: We really want to remove the bogus case stmt from the substmt,
// but we have no way to do this right now.
CaseListIsErroneous = true;