forked from OSchip/llvm-project
Fix gcc ambiguity error (Visual C++ was OK with these).
llvm-svn: 232623
This commit is contained in:
parent
92e1b62d45
commit
49c63695c0
|
@ -906,12 +906,12 @@ Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch,
|
|||
if (PrevString == CurrString)
|
||||
Diag(CaseVals[i].second->getLHS()->getLocStart(),
|
||||
diag::err_duplicate_case) <<
|
||||
(PrevString.empty() ? CaseValStr : PrevString);
|
||||
(PrevString.empty() ? StringRef(CaseValStr) : PrevString);
|
||||
else
|
||||
Diag(CaseVals[i].second->getLHS()->getLocStart(),
|
||||
diag::err_duplicate_case_differing_expr) <<
|
||||
(PrevString.empty() ? CaseValStr : PrevString) <<
|
||||
(CurrString.empty() ? CaseValStr : CurrString) <<
|
||||
(PrevString.empty() ? StringRef(CaseValStr) : PrevString) <<
|
||||
(CurrString.empty() ? StringRef(CaseValStr) : CurrString) <<
|
||||
CaseValStr;
|
||||
|
||||
Diag(CaseVals[i-1].second->getLHS()->getLocStart(),
|
||||
|
|
Loading…
Reference in New Issue