]> granicus.if.org Git - clang/commitdiff
Fix "enumeral mismatch in conditional expression" gcc7 warning. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 17 Dec 2018 12:25:42 +0000 (12:25 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 17 Dec 2018 12:25:42 +0000 (12:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349343 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaStmtAttr.cpp

index 353cd60c4a42c1c3a300f3d27fab012ae930ca20..91f79971662a17333a2a769e11d6150191b7a6d9 100644 (file)
@@ -316,9 +316,10 @@ static Attr *ProcessStmtAttribute(Sema &S, Stmt *St, const ParsedAttr &A,
                                   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);