r367574 - Rename two clang tests from .cc to .cpp.

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 1 08:06:57 PDT 2019


Author: nico
Date: Thu Aug  1 08:06:57 2019
New Revision: 367574

URL: http://llvm.org/viewvc/llvm-project?rev=367574&view=rev
Log:
Rename two clang tests from .cc to .cpp.

clang/test/lit.cfg.py doesn't list .cc as test extension, so these
tests never ran.

Tweak one of the two tests to actually pass, now that it runs.
(The other one was already passing.)

Added:
    cfe/trunk/test/Analysis/structured_bindings.cpp
    cfe/trunk/test/CodeGen/ppc-vector-compare.cpp
Removed:
    cfe/trunk/test/Analysis/structured_bindings.cc
    cfe/trunk/test/CodeGen/ppc-vector-compare.cc

Removed: cfe/trunk/test/Analysis/structured_bindings.cc
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/structured_bindings.cc?rev=367573&view=auto
==============================================================================
--- cfe/trunk/test/Analysis/structured_bindings.cc (original)
+++ cfe/trunk/test/Analysis/structured_bindings.cc (removed)
@@ -1,10 +0,0 @@
-// RUN: %clang_analyze_cc1 -std=c++17 -analyzer-checker=core -verify %s
-
-// expected-no-diagnostics
-struct s { int a; };
-int foo() {
-    auto[a] = s{1}; // FIXME: proper modelling
-    if (a) {
-    }
-}
-

Added: cfe/trunk/test/Analysis/structured_bindings.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/structured_bindings.cpp?rev=367574&view=auto
==============================================================================
--- cfe/trunk/test/Analysis/structured_bindings.cpp (added)
+++ cfe/trunk/test/Analysis/structured_bindings.cpp Thu Aug  1 08:06:57 2019
@@ -0,0 +1,9 @@
+// RUN: %clang_analyze_cc1 -std=c++17 -analyzer-checker=core -verify %s
+
+struct s { int a; };
+int foo() {
+    auto[a] = s{1}; // FIXME: proper modelling
+    if (a) {
+    }
+} // expected-warning{{control reaches end of non-void function}}
+

Removed: cfe/trunk/test/CodeGen/ppc-vector-compare.cc
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ppc-vector-compare.cc?rev=367573&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/ppc-vector-compare.cc (original)
+++ cfe/trunk/test/CodeGen/ppc-vector-compare.cc (removed)
@@ -1,34 +0,0 @@
-// RUN: %clang_cc1 -target-feature +vsx -triple powerpc64-unknown-unknown -emit-llvm %s \
-// RUN:            -o - | FileCheck %s
-
-#include <altivec.h>
-
-// CHECK-LABEL: @_Z5test1Dv8_tS_
-// CHECK: @llvm.ppc.altivec.vcmpequh.p
-bool test1(vector unsigned short v1, vector unsigned short v2) {
-  return v1 == v2;
-}
-
-// CHECK-LABEL: @_Z5test2Dv2_mS_Dv2_lS0_Dv2_yS1_Dv2_xS2_Dv2_dS3_
-bool test2(vector unsigned long v1, vector unsigned long v2,
-           vector long v3, vector long v4,
-           vector unsigned long long v5, vector unsigned long long v6,
-           vector long long v7, vector long long v8,
-           vector double v9, vector double v10) {
-  // CHECK: @llvm.ppc.altivec.vcmpequd.p
-  bool res = v1 == v2;
-
-  // CHECK: @llvm.ppc.altivec.vcmpequd.p
-  res |= v3 == v4;
-
-  // CHECK: @llvm.ppc.altivec.vcmpequd.p
-  res |= v5 == v6;
-
-  // CHECK: @llvm.ppc.altivec.vcmpequd.p
-  res |= v7 == v8;
-
-  // CHECK: @llvm.ppc.vsx.xvcmpeqdp.p
-  res |= v9 == v10;
-  return res;
-}
-

Added: cfe/trunk/test/CodeGen/ppc-vector-compare.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ppc-vector-compare.cpp?rev=367574&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/ppc-vector-compare.cpp (added)
+++ cfe/trunk/test/CodeGen/ppc-vector-compare.cpp Thu Aug  1 08:06:57 2019
@@ -0,0 +1,34 @@
+// RUN: %clang_cc1 -target-feature +vsx -triple powerpc64-unknown-unknown -emit-llvm %s \
+// RUN:            -o - | FileCheck %s
+
+#include <altivec.h>
+
+// CHECK-LABEL: @_Z5test1Dv8_tS_
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+bool test1(vector unsigned short v1, vector unsigned short v2) {
+  return v1 == v2;
+}
+
+// CHECK-LABEL: @_Z5test2Dv2_mS_Dv2_lS0_Dv2_yS1_Dv2_xS2_Dv2_dS3_
+bool test2(vector unsigned long v1, vector unsigned long v2,
+           vector long v3, vector long v4,
+           vector unsigned long long v5, vector unsigned long long v6,
+           vector long long v7, vector long long v8,
+           vector double v9, vector double v10) {
+  // CHECK: @llvm.ppc.altivec.vcmpequd.p
+  bool res = v1 == v2;
+
+  // CHECK: @llvm.ppc.altivec.vcmpequd.p
+  res |= v3 == v4;
+
+  // CHECK: @llvm.ppc.altivec.vcmpequd.p
+  res |= v5 == v6;
+
+  // CHECK: @llvm.ppc.altivec.vcmpequd.p
+  res |= v7 == v8;
+
+  // CHECK: @llvm.ppc.vsx.xvcmpeqdp.p
+  res |= v9 == v10;
+  return res;
+}
+




More information about the cfe-commits mailing list