r349343 - Fix "enumeral mismatch in conditional expression" gcc7 warning. NFCI.
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 17 04:25:42 PST 2018
Author: rksimon
Date: Mon Dec 17 04:25:42 2018
New Revision: 349343
URL: http://llvm.org/viewvc/llvm-project?rev=349343&view=rev
Log:
Fix "enumeral mismatch in conditional expression" gcc7 warning. NFCI.
Modified:
cfe/trunk/lib/Sema/SemaStmtAttr.cpp
Modified: cfe/trunk/lib/Sema/SemaStmtAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaStmtAttr.cpp?rev=349343&r1=349342&r2=349343&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaStmtAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmtAttr.cpp Mon Dec 17 04:25:42 2018
@@ -316,9 +316,10 @@ static Attr *ProcessStmtAttribute(Sema &
SourceRange Range) {
switch (A.getKind()) {
case ParsedAttr::UnknownAttribute:
- S.Diag(A.getLoc(), A.isDeclspecAttribute() ?
- diag::warn_unhandled_ms_attribute_ignored :
- diag::warn_unknown_attribute_ignored) << A.getName();
+ S.Diag(A.getLoc(), A.isDeclspecAttribute()
+ ? (unsigned)diag::warn_unhandled_ms_attribute_ignored
+ : (unsigned)diag::warn_unknown_attribute_ignored)
+ << A.getName();
return nullptr;
case ParsedAttr::AT_FallThrough:
return handleFallThroughAttr(S, St, A, Range);
More information about the cfe-commits
mailing list