summaryrefslogtreecommitdiffstats
path: root/Tests/CompileFeatures
diff options
context:
space:
mode:
authornic-kaczinsky <nicolas.kaczinsky@gmail.com>2021-04-16 06:55:30 (GMT)
committerBrad King <brad.king@kitware.com>2021-04-16 15:49:51 (GMT)
commitae2c24b0bafd341928fd6e95acc60ece2c45aa0e (patch)
tree6ffb17baa0d214974191013c1beeed18751c0632 /Tests/CompileFeatures
parente5a098968c3a25df75b82363515795e793a668ae (diff)
downloadCMake-ae2c24b0bafd341928fd6e95acc60ece2c45aa0e.zip
CMake-ae2c24b0bafd341928fd6e95acc60ece2c45aa0e.tar.gz
CMake-ae2c24b0bafd341928fd6e95acc60ece2c45aa0e.tar.bz2
Tests: Fix warning clang-analyzer-cplusplus.NewDeleteLeaks
Fix the warning: `potential leak of memory pointed to by "vp"`.
Diffstat (limited to 'Tests/CompileFeatures')
-rw-r--r--Tests/CompileFeatures/cxx_contextual_conversions.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tests/CompileFeatures/cxx_contextual_conversions.cpp b/Tests/CompileFeatures/cxx_contextual_conversions.cpp
index 247f13f..fe8d5c0 100644
--- a/Tests/CompileFeatures/cxx_contextual_conversions.cpp
+++ b/Tests/CompileFeatures/cxx_contextual_conversions.cpp
@@ -1,4 +1,3 @@
-
#define assert(E) \
if (!(E)) \
return 1;
@@ -38,6 +37,7 @@ int someFunc()
}
int* vp = new int[i];
+ delete[] vp;
return 0;
}