Explorar o código

[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256318 91177308-0d34-0410-b5e6-96231b3b80d8
Craig Topper %!s(int64=9) %!d(string=hai) anos
pai
achega
a2456fbb78
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      lib/Sema/SemaStmtAttr.cpp

+ 2 - 3
lib/Sema/SemaStmtAttr.cpp

@@ -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: