Revert r347417 "Re-Reinstate 347294 with a fix for the failures."
Kept the "indirect_builtin_constant_p" test case in test/SemaCXX/constant-expression-cxx1y.cpp
while we are investigating why the following snippet fails:
extern char extern_var;
struct { int a; } a = {__builtin_constant_p(extern_var)};
llvm-svn: 348039
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp
index c92338a..9113b67 100644
--- a/clang/lib/CodeGen/CGStmtOpenMP.cpp
+++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp
@@ -2321,11 +2321,9 @@
Chunk = EmitScalarConversion(Chunk, ChunkExpr->getType(),
S.getIterationVariable()->getType(),
S.getBeginLoc());
- Expr::EvalResult Result;
- if (ChunkExpr->EvaluateAsInt(Result, getContext())) {
- llvm::APSInt EvaluatedChunk = Result.Val.getInt();
+ llvm::APSInt EvaluatedChunk;
+ if (ChunkExpr->EvaluateAsInt(EvaluatedChunk, getContext()))
HasChunkSizeOne = (EvaluatedChunk.getLimitedValue() == 1);
- }
}
const unsigned IVSize = getContext().getTypeSize(IVExpr->getType());
const bool IVSigned = IVExpr->getType()->hasSignedIntegerRepresentation();