[PATCH] D38145: Suppress Wsign-conversion for enums with matching underlying type

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 21 11:45:03 PDT 2017


efriedma added inline comments.


================
Comment at: lib/Sema/SemaChecking.cpp:8176
+        return IntRange(C.getIntWidth(QualType(T, 0)),
+                        !ET->isSignedIntegerOrEnumerationType());
 
----------------
Maybe add a comment noting what can trigger this case?


================
Comment at: test/SemaCXX/sign-conversion.cpp:21
+  return foo;
+}
----------------
There's an existing file test/SemaCXX/warn-sign-conversion.cpp for C++ sign-conversion tests.


https://reviews.llvm.org/D38145





More information about the cfe-commits mailing list