[clang-tools-extra] r354069 - [clang-tidy] Mention language version in test explicitly.
Volodymyr Sapsai via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 14 14:37:30 PST 2019
Author: vsapsai
Date: Thu Feb 14 14:37:30 2019
New Revision: 354069
URL: http://llvm.org/viewvc/llvm-project?rev=354069&view=rev
Log:
[clang-tidy] Mention language version in test explicitly.
"modernize-use-using" check is applicable only to C++11 and later. Spell it out
to avoid relying on default language version.
rdar://problem/47932196
Modified:
clang-tools-extra/trunk/test/clang-tidy/clang-tidy-mac-libcxx.cpp
Modified: clang-tools-extra/trunk/test/clang-tidy/clang-tidy-mac-libcxx.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/clang-tidy-mac-libcxx.cpp?rev=354069&r1=354068&r2=354069&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-tidy/clang-tidy-mac-libcxx.cpp (original)
+++ clang-tools-extra/trunk/test/clang-tidy/clang-tidy-mac-libcxx.cpp Thu Feb 14 14:37:30 2019
@@ -8,7 +8,7 @@
// RUN: cp -r %S/Inputs/mock-libcxx %t/
//
// Pretend clang is installed beside the mock library that we provided.
-// RUN: echo '[{"directory":"%t","command":"%t/mock-libcxx/bin/clang++ -stdlib=libc++ -target x86_64-apple-darwin -c test.cpp","file":"test.cpp"}]' | sed -e 's/\\/\//g' > %t/compile_commands.json
+// RUN: echo '[{"directory":"%t","command":"%t/mock-libcxx/bin/clang++ -stdlib=libc++ -std=c++11 -target x86_64-apple-darwin -c test.cpp","file":"test.cpp"}]' | sed -e 's/\\/\//g' > %t/compile_commands.json
// RUN: cp "%s" "%t/test.cpp"
// RUN: clang-tidy -header-filter='.*' -system-headers -checks='-*,modernize-use-using' "%t/test.cpp" | FileCheck %s
// CHECK: mock_vector:{{[0-9]+}}:{{[0-9]+}}: warning: use 'using' instead of 'typedef'
More information about the cfe-commits
mailing list