aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Dergachev <artem.dergachev@gmail.com>2019-10-19 00:08:17 +0000
committerArtem Dergachev <artem.dergachev@gmail.com>2019-10-19 00:08:17 +0000
commite0c6af7e0c294c0d322c6ccab6757dda0fc5db81 (patch)
tree5534c371e122658e644f397022d17a5981213a2d
parent05441b0db7bf23d206dfc865b5c5bde17da1dab0 (diff)
downloadclang-e0c6af7e0c294c0d322c6ccab6757dda0fc5db81.tar.gz
[analyzer] Specify the C++ standard in more tests.
Makes life easier for downstream developers with different default standard. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@375308 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Analysis/cast-value-logic.cpp2
-rw-r--r--test/Analysis/cast-value-notes.cpp2
-rw-r--r--test/Analysis/cast-value-state-dump.cpp2
-rw-r--r--test/Analysis/ctu-different-triples.cpp4
-rw-r--r--test/Analysis/ctu-main.cpp8
-rw-r--r--test/Analysis/ctu-unknown-parts-in-triples.cpp4
-rw-r--r--test/Analysis/deadstores-driverkit.cpp2
-rw-r--r--test/Analysis/diagnostics/dtors.cpp2
-rw-r--r--test/Analysis/domtest.cpp2
-rw-r--r--test/Analysis/explain-svals.cpp2
-rw-r--r--test/Analysis/initialization.cpp2
-rw-r--r--test/Analysis/inlining/placement-new-fp-suppression.cpp4
-rw-r--r--test/Analysis/inner-pointer.cpp2
-rw-r--r--test/Analysis/malloc.mm2
-rw-r--r--test/Analysis/mig.mm2
-rw-r--r--test/Analysis/new-ctor-null-throw.cpp4
-rw-r--r--test/Analysis/new-ctor-null.cpp2
-rw-r--r--test/Analysis/osobject-retain-release.cpp2
-rw-r--r--test/Analysis/osobjectcstylecastchecker_test.cpp2
-rw-r--r--test/Analysis/plist-macros-with-expansion.cpp4
-rw-r--r--test/Analysis/ptr-iter.cpp2
-rw-r--r--test/Analysis/ptr-sort.cpp2
-rw-r--r--test/Analysis/rvo.cpp2
-rw-r--r--test/Analysis/sizeofpack.cpp2
-rw-r--r--test/Analysis/stack-frame-context-revision.cpp2
-rw-r--r--test/Analysis/temporaries.mm2
-rw-r--r--test/Analysis/test-separate-retaincount.cpp6
-rw-r--r--test/Analysis/track-control-dependency-conditions.cpp8
-rw-r--r--test/Analysis/unions.cpp2
29 files changed, 42 insertions, 42 deletions
diff --git a/test/Analysis/cast-value-logic.cpp b/test/Analysis/cast-value-logic.cpp
index 221ae7f9ae..1411ede92e 100644
--- a/test/Analysis/cast-value-logic.cpp
+++ b/test/Analysis/cast-value-logic.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 \
+// RUN: %clang_analyze_cc1 -std=c++14 \
// RUN: -analyzer-checker=core,apiModeling.llvm.CastValue,debug.ExprInspection\
// RUN: -verify %s
diff --git a/test/Analysis/cast-value-notes.cpp b/test/Analysis/cast-value-notes.cpp
index a0eaeae8ba..eb5d1b3d3f 100644
--- a/test/Analysis/cast-value-notes.cpp
+++ b/test/Analysis/cast-value-notes.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 \
+// RUN: %clang_analyze_cc1 -std=c++14 \
// RUN: -analyzer-checker=core,apiModeling.llvm.CastValue,debug.ExprInspection\
// RUN: -analyzer-output=text -verify %s
diff --git a/test/Analysis/cast-value-state-dump.cpp b/test/Analysis/cast-value-state-dump.cpp
index b8152d46da..9abdaae0d4 100644
--- a/test/Analysis/cast-value-state-dump.cpp
+++ b/test/Analysis/cast-value-state-dump.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 \
+// RUN: %clang_analyze_cc1 -std=c++14 \
// RUN: -analyzer-checker=core,apiModeling.llvm.CastValue,debug.ExprInspection\
// RUN: -analyzer-output=text -verify %s 2>&1 | FileCheck %s
diff --git a/test/Analysis/ctu-different-triples.cpp b/test/Analysis/ctu-different-triples.cpp
index dbfa82fb48..20acc318e2 100644
--- a/test/Analysis/ctu-different-triples.cpp
+++ b/test/Analysis/ctu-different-triples.cpp
@@ -1,9 +1,9 @@
// RUN: rm -rf %t && mkdir %t
// RUN: mkdir -p %t/ctudir
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu \
+// RUN: %clang_cc1 -std=c++14 -triple x86_64-pc-linux-gnu \
// RUN: -emit-pch -o %t/ctudir/ctu-other.cpp.ast %S/Inputs/ctu-other.cpp
// RUN: cp %S/Inputs/ctu-other.cpp.externalDefMap.txt %t/ctudir/externalDefMap.txt
-// RUN: %clang_analyze_cc1 -triple powerpc64-montavista-linux-gnu \
+// RUN: %clang_analyze_cc1 -std=c++14 -triple powerpc64-montavista-linux-gnu \
// RUN: -analyzer-checker=core,debug.ExprInspection \
// RUN: -analyzer-config experimental-enable-naive-ctu-analysis=true \
// RUN: -analyzer-config ctu-dir=%t/ctudir \
diff --git a/test/Analysis/ctu-main.cpp b/test/Analysis/ctu-main.cpp
index abfacfbdae..3f095a0aab 100644
--- a/test/Analysis/ctu-main.cpp
+++ b/test/Analysis/ctu-main.cpp
@@ -1,16 +1,16 @@
// RUN: rm -rf %t && mkdir %t
// RUN: mkdir -p %t/ctudir
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu \
+// RUN: %clang_cc1 -std=c++14 -triple x86_64-pc-linux-gnu \
// RUN: -emit-pch -o %t/ctudir/ctu-other.cpp.ast %S/Inputs/ctu-other.cpp
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu \
+// RUN: %clang_cc1 -std=c++14 -triple x86_64-pc-linux-gnu \
// RUN: -emit-pch -o %t/ctudir/ctu-chain.cpp.ast %S/Inputs/ctu-chain.cpp
// RUN: cp %S/Inputs/ctu-other.cpp.externalDefMap.txt %t/ctudir/externalDefMap.txt
-// RUN: %clang_analyze_cc1 -triple x86_64-pc-linux-gnu \
+// RUN: %clang_analyze_cc1 -std=c++14 -triple x86_64-pc-linux-gnu \
// RUN: -analyzer-checker=core,debug.ExprInspection \
// RUN: -analyzer-config experimental-enable-naive-ctu-analysis=true \
// RUN: -analyzer-config ctu-dir=%t/ctudir \
// RUN: -verify %s
-// RUN: %clang_analyze_cc1 -triple x86_64-pc-linux-gnu \
+// RUN: %clang_analyze_cc1 -std=c++14 -triple x86_64-pc-linux-gnu \
// RUN: -analyzer-checker=core,debug.ExprInspection \
// RUN: -analyzer-config experimental-enable-naive-ctu-analysis=true \
// RUN: -analyzer-config ctu-dir=%t/ctudir \
diff --git a/test/Analysis/ctu-unknown-parts-in-triples.cpp b/test/Analysis/ctu-unknown-parts-in-triples.cpp
index 5e643c164d..6bcbd709b5 100644
--- a/test/Analysis/ctu-unknown-parts-in-triples.cpp
+++ b/test/Analysis/ctu-unknown-parts-in-triples.cpp
@@ -3,10 +3,10 @@
// RUN: rm -rf %t && mkdir %t
// RUN: mkdir -p %t/ctudir
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu \
+// RUN: %clang_cc1 -std=c++14 -triple x86_64-pc-linux-gnu \
// RUN: -emit-pch -o %t/ctudir/ctu-other.cpp.ast %S/Inputs/ctu-other.cpp
// RUN: cp %S/Inputs/ctu-other.cpp.externalDefMap.txt %t/ctudir/externalDefMap.txt
-// RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux-gnu \
+// RUN: %clang_analyze_cc1 -std=c++14 -triple x86_64-unknown-linux-gnu \
// RUN: -analyzer-checker=core,debug.ExprInspection \
// RUN: -analyzer-config experimental-enable-naive-ctu-analysis=true \
// RUN: -analyzer-config ctu-dir=%t/ctudir \
diff --git a/test/Analysis/deadstores-driverkit.cpp b/test/Analysis/deadstores-driverkit.cpp
index 0885367b1b..9c423fc6ff 100644
--- a/test/Analysis/deadstores-driverkit.cpp
+++ b/test/Analysis/deadstores-driverkit.cpp
@@ -5,7 +5,7 @@
// It needs to be on the top.
// Run-lines can wait.
-// RUN: %clang_analyze_cc1 -w -triple x86_64-apple-driverkit19.0 \
+// RUN: %clang_analyze_cc1 -std=c++17 -w -triple x86_64-apple-driverkit19.0 \
// RUN: -analyzer-checker=deadcode -verify %s
// expected-no-diagnostics
diff --git a/test/Analysis/diagnostics/dtors.cpp b/test/Analysis/diagnostics/dtors.cpp
index 18bedc61f9..6a8349da9d 100644
--- a/test/Analysis/diagnostics/dtors.cpp
+++ b/test/Analysis/diagnostics/dtors.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 -w -analyzer-checker=core,cplusplus -analyzer-output=text -verify %s
+// RUN: %clang_analyze_cc1 -std=c++14 -w -analyzer-checker=core,cplusplus -analyzer-output=text -verify %s
namespace no_crash_on_delete_dtor {
// We were crashing when producing diagnostics for this code, but not for the
diff --git a/test/Analysis/domtest.cpp b/test/Analysis/domtest.cpp
index 078117ef85..2a2caed130 100644
--- a/test/Analysis/domtest.cpp
+++ b/test/Analysis/domtest.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 %s \
+// RUN: %clang_analyze_cc1 -std=c++14 %s \
// RUN: -analyzer-checker=debug.DumpDominators \
// RUN: -analyzer-checker=debug.DumpPostDominators \
// RUN: -analyzer-checker=debug.DumpControlDependencies \
diff --git a/test/Analysis/explain-svals.cpp b/test/Analysis/explain-svals.cpp
index c1b5200eb8..9c37642758 100644
--- a/test/Analysis/explain-svals.cpp
+++ b/test/Analysis/explain-svals.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 -triple i386-apple-darwin10 -analyzer-checker=core.builtin,debug.ExprInspection,unix.cstring -verify %s
+// RUN: %clang_analyze_cc1 -std=c++14 -triple i386-apple-darwin10 -analyzer-checker=core.builtin,debug.ExprInspection,unix.cstring -verify %s
typedef unsigned long size_t;
diff --git a/test/Analysis/initialization.cpp b/test/Analysis/initialization.cpp
index db765930b6..dd622e077e 100644
--- a/test/Analysis/initialization.cpp
+++ b/test/Analysis/initialization.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core.builtin,debug.ExprInspection -verify %s
+// RUN: %clang_cc1 -std=c++14 -triple i386-apple-darwin10 -analyze -analyzer-checker=core.builtin,debug.ExprInspection -verify %s
void clang_analyzer_eval(int);
diff --git a/test/Analysis/inlining/placement-new-fp-suppression.cpp b/test/Analysis/inlining/placement-new-fp-suppression.cpp
index 5f75411716..5a99ad11cc 100644
--- a/test/Analysis/inlining/placement-new-fp-suppression.cpp
+++ b/test/Analysis/inlining/placement-new-fp-suppression.cpp
@@ -1,8 +1,8 @@
-// RUN: %clang_analyze_cc1 \
+// RUN: %clang_analyze_cc1 -std=c++14 \
// RUN: -analyzer-checker=core.CallAndMessage \
// RUN: -analyzer-config suppress-null-return-paths=false \
// RUN: -verify %s
-// RUN: %clang_analyze_cc1 \
+// RUN: %clang_analyze_cc1 -std=c++14 \
// RUN: -analyzer-checker=core.CallAndMessage \
// RUN: -DSUPPRESSED \
// RUN: -verify %s
diff --git a/test/Analysis/inner-pointer.cpp b/test/Analysis/inner-pointer.cpp
index 5cee0bfbcc..d8b011a7aa 100644
--- a/test/Analysis/inner-pointer.cpp
+++ b/test/Analysis/inner-pointer.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus.InnerPointer \
+// RUN: %clang_analyze_cc1 -std=c++14 -analyzer-checker=cplusplus.InnerPointer \
// RUN: -Wno-dangling -Wno-dangling-field -Wno-return-stack-address \
// RUN: %s -analyzer-output=text -verify
diff --git a/test/Analysis/malloc.mm b/test/Analysis/malloc.mm
index d7bfbf3f34..e84644b9dd 100644
--- a/test/Analysis/malloc.mm
+++ b/test/Analysis/malloc.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix.Malloc -analyzer-store=region -verify -fblocks %s
+// RUN: %clang_analyze_cc1 -std=c++14 -analyzer-checker=core,unix.Malloc -analyzer-store=region -verify -fblocks %s
#import "Inputs/system-header-simulator-objc.h"
#import "Inputs/system-header-simulator-for-malloc.h"
diff --git a/test/Analysis/mig.mm b/test/Analysis/mig.mm
index 0c7d729e93..e8d08f355d 100644
--- a/test/Analysis/mig.mm
+++ b/test/Analysis/mig.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 -w -analyzer-checker=core,osx.MIG\
+// RUN: %clang_analyze_cc1 -w -analyzer-checker=core,osx.MIG -std=c++14 \
// RUN: -analyzer-output=text -fblocks -verify %s
typedef unsigned uint32_t;
diff --git a/test/Analysis/new-ctor-null-throw.cpp b/test/Analysis/new-ctor-null-throw.cpp
index dfa7cba763..28922c0fad 100644
--- a/test/Analysis/new-ctor-null-throw.cpp
+++ b/test/Analysis/new-ctor-null-throw.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_analyze_cc1 -analyzer-checker=core \
+// RUN: %clang_analyze_cc1 -std=c++14 -analyzer-checker=core \
// RUN: -analyzer-config suppress-null-return-paths=false \
// RUN: -verify %s
-// RUN: %clang_analyze_cc1 -analyzer-checker=core \
+// RUN: %clang_analyze_cc1 -std=c++14 -analyzer-checker=core \
// RUN: -DSUPPRESSED \
// RUN: -verify %s
diff --git a/test/Analysis/new-ctor-null.cpp b/test/Analysis/new-ctor-null.cpp
index 32f2f9500c..f3c07e2123 100644
--- a/test/Analysis/new-ctor-null.cpp
+++ b/test/Analysis/new-ctor-null.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 \
+// RUN: %clang_analyze_cc1 -std=c++14 \
// RUN: -analyzer-checker=core,debug.ExprInspection \
// RUN: -verify %s
diff --git a/test/Analysis/osobject-retain-release.cpp b/test/Analysis/osobject-retain-release.cpp
index afcc242583..42675fc70e 100644
--- a/test/Analysis/osobject-retain-release.cpp
+++ b/test/Analysis/osobject-retain-release.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 -fblocks -analyze -analyzer-output=text\
+// RUN: %clang_analyze_cc1 -std=c++14 -fblocks -analyze -analyzer-output=text\
// RUN: -analyzer-checker=core,osx,debug.ExprInspection -verify %s
#include "os_object_base.h"
diff --git a/test/Analysis/osobjectcstylecastchecker_test.cpp b/test/Analysis/osobjectcstylecastchecker_test.cpp
index 07f878cd39..fabed7ee34 100644
--- a/test/Analysis/osobjectcstylecastchecker_test.cpp
+++ b/test/Analysis/osobjectcstylecastchecker_test.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 -analyzer-checker=optin.osx.OSObjectCStyleCast %s -verify
+// RUN: %clang_analyze_cc1 -std=c++14 -analyzer-checker=optin.osx.OSObjectCStyleCast %s -verify
#include "os_object_base.h"
struct OSArray : public OSObject {
diff --git a/test/Analysis/plist-macros-with-expansion.cpp b/test/Analysis/plist-macros-with-expansion.cpp
index e836c78b4b..e07747eaec 100644
--- a/test/Analysis/plist-macros-with-expansion.cpp
+++ b/test/Analysis/plist-macros-with-expansion.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_analyze_cc1 -analyzer-checker=core -verify %s
+// RUN: %clang_analyze_cc1 -std=c++14 -analyzer-checker=core -verify %s
//
-// RUN: %clang_analyze_cc1 -analyzer-checker=core %s \
+// RUN: %clang_analyze_cc1 -std=c++14 -analyzer-checker=core %s \
// RUN: -analyzer-output=plist -o %t.plist \
// RUN: -analyzer-config expand-macros=true
//
diff --git a/test/Analysis/ptr-iter.cpp b/test/Analysis/ptr-iter.cpp
index a35fae470a..a94288cd1c 100644
--- a/test/Analysis/ptr-iter.cpp
+++ b/test/Analysis/ptr-iter.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 %s -analyzer-output=text -verify \
+// RUN: %clang_analyze_cc1 %s -std=c++14 -analyzer-output=text -verify \
// RUN: -analyzer-checker=core,alpha.nondeterminism.PointerIteration
#include "Inputs/system-header-simulator-cxx.h"
diff --git a/test/Analysis/ptr-sort.cpp b/test/Analysis/ptr-sort.cpp
index a4f94817f1..d238b390bd 100644
--- a/test/Analysis/ptr-sort.cpp
+++ b/test/Analysis/ptr-sort.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 %s -analyzer-output=text -verify \
+// RUN: %clang_analyze_cc1 %s -std=c++14 -analyzer-output=text -verify \
// RUN: -analyzer-checker=core,alpha.nondeterminism.PointerSorting
#include "Inputs/system-header-simulator-cxx.h"
diff --git a/test/Analysis/rvo.cpp b/test/Analysis/rvo.cpp
index cf06a9570b..7215fbbded 100644
--- a/test/Analysis/rvo.cpp
+++ b/test/Analysis/rvo.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 -analyzer-checker core,cplusplus \
+// RUN: %clang_analyze_cc1 -analyzer-checker core,cplusplus -std=c++14 \
// RUN: -analyzer-checker debug.ExprInspection -verify %s
void clang_analyzer_eval(bool);
diff --git a/test/Analysis/sizeofpack.cpp b/test/Analysis/sizeofpack.cpp
index 44c3bba3a8..8c0ca02b07 100644
--- a/test/Analysis/sizeofpack.cpp
+++ b/test/Analysis/sizeofpack.cpp
@@ -1,5 +1,5 @@
// RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection \
-// RUN: -verify %s
+// RUN: -std=c++14 -verify %s
typedef __typeof(sizeof(int)) size_t;
diff --git a/test/Analysis/stack-frame-context-revision.cpp b/test/Analysis/stack-frame-context-revision.cpp
index 8c119f50c1..51f86defe3 100644
--- a/test/Analysis/stack-frame-context-revision.cpp
+++ b/test/Analysis/stack-frame-context-revision.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 -analyzer-checker=core,cplusplus.NewDelete -verify %s
+// RUN: %clang_analyze_cc1 -std=c++14 -analyzer-checker=core,cplusplus.NewDelete -verify %s
// expected-no-diagnostics:
// From now the profile of the 'StackFrameContext' also contains the
diff --git a/test/Analysis/temporaries.mm b/test/Analysis/temporaries.mm
index 43546ae344..44d30d5d7d 100644
--- a/test/Analysis/temporaries.mm
+++ b/test/Analysis/temporaries.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 -analyzer-checker core,cplusplus -verify %s
+// RUN: %clang_analyze_cc1 -std=c++14 -analyzer-checker core,cplusplus -verify %s
// expected-no-diagnostics
diff --git a/test/Analysis/test-separate-retaincount.cpp b/test/Analysis/test-separate-retaincount.cpp
index 5fda2b2e22..621e1d120b 100644
--- a/test/Analysis/test-separate-retaincount.cpp
+++ b/test/Analysis/test-separate-retaincount.cpp
@@ -1,12 +1,12 @@
-// RUN: %clang_analyze_cc1 -DNO_CF_OBJECT -verify %s \
+// RUN: %clang_analyze_cc1 -std=c++14 -DNO_CF_OBJECT -verify %s \
// RUN: -analyzer-checker=core,osx \
// RUN: -analyzer-disable-checker osx.cocoa.RetainCount
//
-// RUN: %clang_analyze_cc1 -DNO_OS_OBJECT -verify %s \
+// RUN: %clang_analyze_cc1 -std=c++14 -DNO_OS_OBJECT -verify %s \
// RUN: -analyzer-checker=core,osx \
// RUN: -analyzer-disable-checker osx.OSObjectRetainCount
//
-// RUN: %clang_analyze_cc1 -DNO_OS_OBJECT -verify %s \
+// RUN: %clang_analyze_cc1 -std=c++14 -DNO_OS_OBJECT -verify %s \
// RUN: -analyzer-checker=core,osx \
// RUN: -analyzer-config "osx.cocoa.RetainCount:CheckOSObject=false"
diff --git a/test/Analysis/track-control-dependency-conditions.cpp b/test/Analysis/track-control-dependency-conditions.cpp
index 737620f4c3..11eb1c56a0 100644
--- a/test/Analysis/track-control-dependency-conditions.cpp
+++ b/test/Analysis/track-control-dependency-conditions.cpp
@@ -1,10 +1,10 @@
-// RUN: %clang_analyze_cc1 %s \
+// RUN: %clang_analyze_cc1 %s -std=c++14 \
// RUN: -verify=expected,tracking \
// RUN: -analyzer-config track-conditions=true \
// RUN: -analyzer-output=text \
// RUN: -analyzer-checker=core
-// RUN: not %clang_analyze_cc1 -verify %s \
+// RUN: not %clang_analyze_cc1 -std=c++14 -verify %s \
// RUN: -analyzer-checker=core \
// RUN: -analyzer-config track-conditions=false \
// RUN: -analyzer-config track-conditions-debug=true \
@@ -14,14 +14,14 @@
// CHECK-INVALID-DEBUG-SAME: 'track-conditions-debug', that expects
// CHECK-INVALID-DEBUG-SAME: 'track-conditions' to also be enabled
//
-// RUN: %clang_analyze_cc1 %s \
+// RUN: %clang_analyze_cc1 %s -std=c++14 \
// RUN: -verify=expected,tracking,debug \
// RUN: -analyzer-config track-conditions=true \
// RUN: -analyzer-config track-conditions-debug=true \
// RUN: -analyzer-output=text \
// RUN: -analyzer-checker=core
-// RUN: %clang_analyze_cc1 %s -verify \
+// RUN: %clang_analyze_cc1 %s -std=c++14 -verify \
// RUN: -analyzer-output=text \
// RUN: -analyzer-config track-conditions=false \
// RUN: -analyzer-checker=core
diff --git a/test/Analysis/unions.cpp b/test/Analysis/unions.cpp
index 6fd35d1a43..76eb20550f 100644
--- a/test/Analysis/unions.cpp
+++ b/test/Analysis/unions.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix.Malloc,debug.ExprInspection %s -analyzer-config eagerly-assume=false -verify
+// RUN: %clang_analyze_cc1 -std=c++14 -analyzer-checker=core,unix.Malloc,debug.ExprInspection %s -analyzer-config eagerly-assume=false -verify
extern void clang_analyzer_eval(bool);
extern void clang_analyzer_warnIfReached();