瀏覽代碼

[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 9 年之前
父節點
當前提交
a2456fbb78
共有 1 個文件被更改,包括 2 次插入3 次删除
  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: