aaron.ballman added a comment.

Can you generate the updated patch with more context 
(https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface)?



================
Comment at: lib/Sema/SemaStmt.cpp:746
 
+static void checkEnumTypesInSwitchStmt(Sema &S, Expr *Cond, Expr *Case) {
+  QualType CondType = GetTypeBeforeIntegralPromotion(Cond);
----------------
`Cond` and `Case` can be declared as `const` pointers.


================
Comment at: lib/Sema/SemaStmt.cpp:758
+
+  SourceLocation Loc = Case->getExprLoc();
+  S.Diag(Loc, diag::warn_comparison_of_mixed_enum_types)
----------------
You can lower this in to the diagnostic.


https://reviews.llvm.org/D36407



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to