[PATCH] D42561: [PR36008] Avoid -Wsign-compare warning for enum constants in typeof expressions
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 26 08:03:49 PST 2018
aaron.ballman added inline comments.
================
Comment at: lib/Sema/SemaChecking.cpp:8959
+ if (!S.getLangOpts().CPlusPlus) {
+ if (const TypeOfExprType *TET = dyn_cast<TypeOfExprType>(RHS->getType()))
+ RHS = TET->getUnderlyingExpr()->IgnoreParenImpCasts();
----------------
lebedev.ri wrote:
> Please also add a comment what this is trying to solve.
`const auto *`
================
Comment at: test/Sema/compare.c:398
+enum PR36008EnumTest {
+ kPR36008Value = 0,
+};
----------------
Formatting looks off here.
Repository:
rC Clang
https://reviews.llvm.org/D42561
More information about the cfe-commits
mailing list