[clang] ab7a60e - Revert "Fix MSVC "not all control paths return a value" warnings. NFCI."

Arthur Eubanks via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 22 10:23:08 PST 2020


Author: Arthur Eubanks
Date: 2020-12-22T10:18:07-08:00
New Revision: ab7a60eb4100ab197665b86f682dad0e787a4fed

URL: https://github.com/llvm/llvm-project/commit/ab7a60eb4100ab197665b86f682dad0e787a4fed
DIFF: https://github.com/llvm/llvm-project/commit/ab7a60eb4100ab197665b86f682dad0e787a4fed.diff

LOG: Revert "Fix MSVC "not all control paths return a value" warnings. NFCI."

This reverts commit 7e84aa1b81e72d44bcc58ffe1731bfc7abb73ce0.

This is part of 5 commits being reverted due to https://crbug.com/1161059. See bug for repro.

Added: 
    

Modified: 
    clang/lib/Sema/SemaTemplate.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index 9d31a8701241..74a31c0a1b65 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -7637,7 +7637,6 @@ static Expr *BuildExpressionFromNonTypeTemplateArgumentValue(
     auto *OVE = new (S.Context) OpaqueValueExpr(Loc, T, VK);
     return ConstantExpr::Create(S.Context, OVE, Val);
   }
-  llvm_unreachable("Unhandled APValue::ValueKind enum");
 }
 
 ExprResult
@@ -7667,7 +7666,6 @@ Sema::BuildExpressionFromNonTypeTemplateArgument(const TemplateArgument &Arg,
     return BuildExpressionFromNonTypeTemplateArgumentValue(
         *this, Arg.getUncommonValueType(), Arg.getAsUncommonValue(), Loc);
   }
-  llvm_unreachable("Unhandled TemplateArgument::ArgKind enum");
 }
 
 /// Match two template parameters within template parameter lists.


        


More information about the cfe-commits mailing list