aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Tooling/CompilationDatabaseTest.cpp
diff options
context:
space:
mode:
authorHaojian Wu <hokein@google.com>2018-04-11 09:18:18 +0000
committerHaojian Wu <hokein@google.com>2018-04-11 09:18:18 +0000
commit27695da998b0934467767fe1e3c53de3dee89bf0 (patch)
tree450ddea3a8cb799882cd2938ae41d6122b7006da /clang/unittests/Tooling/CompilationDatabaseTest.cpp
parent9f0b8e8025192f127918677ebf6ec005bbbc5ec1 (diff)
downloadllvm-27695da998b0934467767fe1e3c53de3dee89bf0.zip
llvm-27695da998b0934467767fe1e3c53de3dee89bf0.tar.gz
llvm-27695da998b0934467767fe1e3c53de3dee89bf0.tar.bz2
[Tooling] Correct the "-std" compile command option.
Summary: "-std c++11" is not valid in compiler, we have to use "-std=c++11". Test in vscode with this patch, code completion for header works as expected. Reviewers: sammccall Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D45512 llvm-svn: 329786
Diffstat (limited to 'clang/unittests/Tooling/CompilationDatabaseTest.cpp')
-rw-r--r--clang/unittests/Tooling/CompilationDatabaseTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/unittests/Tooling/CompilationDatabaseTest.cpp b/clang/unittests/Tooling/CompilationDatabaseTest.cpp
index 9480902..42497f7 100644
--- a/clang/unittests/Tooling/CompilationDatabaseTest.cpp
+++ b/clang/unittests/Tooling/CompilationDatabaseTest.cpp
@@ -711,9 +711,9 @@ TEST_F(InterpolateTest, Language) {
// .h is ambiguous, so we add explicit language flags
EXPECT_EQ(getCommand("foo.h"),
- "clang -D dir/foo.cpp -x c++-header -std c++17");
+ "clang -D dir/foo.cpp -x c++-header -std=c++17");
// and don't add -x if the inferred language is correct.
- EXPECT_EQ(getCommand("foo.hpp"), "clang -D dir/foo.cpp -std c++17");
+ EXPECT_EQ(getCommand("foo.hpp"), "clang -D dir/foo.cpp -std=c++17");
// respect -x if it's already there.
EXPECT_EQ(getCommand("baz.h"), "clang -D dir/baz.cee -x c-header");
// prefer a worse match with the right language