[PATCH] D27299: [Sema] C++11 opaque enums should avoid the "case value not in enumerated type" switch warning

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 1 22:23:16 PST 2016


ahatanak added inline comments.


================
Comment at: lib/Sema/SemaStmt.cpp:1165
 
       if (!hasCasesNotInSwitch)
         SS->setAllEnumCasesCovered();
----------------
This function used to call setAllEnumCasesCovered() when parsing a switch statement with an opaque enum condition, but this patch changes the behavior. I couldn't tell whether isAllEnumCasesCovered should return true or false for such switch statements, but was this change intentional?


Repository:
  rL LLVM

https://reviews.llvm.org/D27299





More information about the cfe-commits mailing list