From a2456fbb78a60dadb5110624686aed28bb4b0325 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 23 Dec 2015 05:44:43 +0000 Subject: [PATCH] [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 --- lib/Sema/SemaStmtAttr.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Sema/SemaStmtAttr.cpp b/lib/Sema/SemaStmtAttr.cpp index 02d562852f..984bd078fa 100644 --- a/lib/Sema/SemaStmtAttr.cpp +++ b/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: -- 2.50.1