Reverting commit da5a780ff9fff7e226ca84728075adabc4d1608c
diff --git a/kokoro/check-format/build.sh b/kokoro/check-format/build.sh
index 888d24b..2a8d50f 100644
--- a/kokoro/check-format/build.sh
+++ b/kokoro/check-format/build.sh
@@ -21,8 +21,7 @@
set -x
BUILD_ROOT=$PWD
-SRC=/usr/local/google/home/sarahmashay/Desktop/SPIRV/spirv2
-
+SRC=$PWD/github/SPIRV-Tools
# Get clang-format-5.0.0.
# Once kokoro upgrades the Ubuntu VMs, we can use 'apt-get install clang-format'
@@ -31,10 +30,10 @@
export PATH=$PWD/clang+llvm-5.0.0-linux-x86_64-ubuntu14.04/bin:$PATH
cd $SRC
-# git clone --depth=1 https://github.com/KhronosGroup/SPIRV-Headers external/spirv-headers
-# git clone --depth=1 https://github.com/google/googletest external/googletest
-# git clone --depth=1 https://github.com/google/effcee external/effcee
-# git clone --depth=1 https://github.com/google/re2 external/re2
+git clone --depth=1 https://github.com/KhronosGroup/SPIRV-Headers external/spirv-headers
+git clone --depth=1 https://github.com/google/googletest external/googletest
+git clone --depth=1 https://github.com/google/effcee external/effcee
+git clone --depth=1 https://github.com/google/re2 external/re2
curl -L http://llvm.org/svn/llvm-project/cfe/trunk/tools/clang-format/clang-format-diff.py -o utils/clang-format-diff.py;
echo $(date): Check formatting...
diff --git a/source/val/validate_memory.cpp b/source/val/validate_memory.cpp
index c91c8f0..f6127a1 100644
--- a/source/val/validate_memory.cpp
+++ b/source/val/validate_memory.cpp
@@ -1181,21 +1181,6 @@
<< state.getIdName(inst->id()) << "' must be an OpTypeRuntimeArray.";
}
- const bool uses_variable_pointers =
- state.features().variable_pointers ||
- state.features().variable_pointers_storage_buffer;
-
- if (!pointer_type ||
- ((state.addressing_model() == SpvAddressingModelLogical) &&
- ((!uses_variable_pointers &&
- !spvOpcodeReturnsLogicalPointer(pointer->opcode())) ||
- (uses_variable_pointers &&
- spvOpcodeReturnsLogicalVariablePointer(pointer->opcode()))))) {
- return state.diag(SPV_ERROR_INVALID_ID, inst)
- << "A variable pointer with the Logical addressing model cannot"
- << "be an operand to an OpArrayLength instruction";
- }
-
// The array member must the the index of the last element (the run time
// array).
if (inst->GetOperandAs<uint32_t>(3) != num_of_members - 1) {
diff --git a/test/val/val_id_test.cpp b/test/val/val_id_test.cpp
index 1310e9c..266aaf3 100644
--- a/test/val/val_id_test.cpp
+++ b/test/val/val_id_test.cpp
@@ -2129,38 +2129,6 @@
EXPECT_EQ(SPV_SUCCESS, ValidateInstructions());
}
-TEST_F(ValidateIdWithMessage, OpVariablePointerAsOpArrayLengthOperandBad) {
- const std::string spirv = R"(
-OpCapability Shader
-OpCapability Linkage
-OpCapability VariablePointersStorageBuffer
-OpExtension "SPV_KHR_variable_pointers"
-OpMemoryModel Logical GLSL450
-OpDecorate %block Block
-OpMemberDecorate %block 0 Offset 0
-%void = OpTypeVoid
-%int = OpTypeInt 32 0
-%run_arr = OpTypeRuntimeArray %int
-%block = OpTypeStruct %run_arr
-%ptr_ssbo_block = OpTypePointer StorageBuffer %block
-%null = OpConstantNull %ptr_ssbo_block
-%voidfn = OpTypeFunction %void
-%func = OpFunction %void None %voidfn
-%entry = OpLabel
-%length = OpArrayLength %int %null 0
-OpReturn
-OpFunctionEnd
-
-)";
-
- CompileSuccessfully(spirv);
- EXPECT_EQ(SPV_ERROR_INVALID_ID, ValidateInstructions());
- EXPECT_THAT(
- getDiagnosticString(),
- HasSubstr("A variable pointer with the Logical addressing model cannot"
- "be an operand to an OpArrayLength instruction"));
-}
-
TEST_F(ValidateIdWithMessage, OpVariablePointerNoVariablePointersBad) {
const std::string spirv = R"(
OpCapability Shader