r256318 - [Sema] Use available enum types instead of integers. As one is used in a switch, this makes the compiler ensure the switch is fully covered. NFC
Craig Topper via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 22 21:44:44 PST 2015
Author: ctopper
Date: Tue Dec 22 23:44:43 2015
New Revision: 256318
URL: http://llvm.org/viewvc/llvm-project?rev=256318&view=rev
Log:
[Sema] Use available enum types instead of integers. As one is used in a switch, this makes the compiler ensure the switch is fully covered. NFC
Modified:
cfe/trunk/lib/Sema/SemaStmtAttr.cpp
Modified: cfe/trunk/lib/Sema/SemaStmtAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaStmtAttr.cpp?rev=256318&r1=256317&r2=256318&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaStmtAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmtAttr.cpp Tue Dec 22 23:44:43 2015
@@ -150,9 +150,8 @@ CheckForIncompatibleAttributes(Sema &S,
if (!LH)
continue;
- int Option = LH->getOption();
- int Category;
- enum { Vectorize, Interleave, Unroll };
+ LoopHintAttr::OptionType Option = LH->getOption();
+ enum { Vectorize, Interleave, Unroll } Category;
switch (Option) {
case LoopHintAttr::Vectorize:
case LoopHintAttr::VectorizeWidth:
More information about the cfe-commits
mailing list