[analyzer] Fix the 'analyzer-enabled-checkers.c' test on non-linux machines.
authorArtem Dergachev <artem.dergachev@gmail.com>
Thu, 12 Sep 2019 22:11:15 +0000 (22:11 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Thu, 12 Sep 2019 22:11:15 +0000 (22:11 +0000)
'-Xclang -triple' doesn't seem to override the default target triple
as reliably as '--target'. This leads to test failing due to
platform-specific checks getting unexpectedly enabled.

llvm-svn: 371781

clang/test/Analysis/analyzer-enabled-checkers.c

index 0618a68..ba850ec 100644 (file)
@@ -1,5 +1,4 @@
-// RUN: %clang --analyze %s \
-// RUN:   -Xclang -triple -Xclang x86_64-pc-linux-gnu \
+// RUN: %clang --analyze %s --target=x86_64-pc-linux-gnu \
 // RUN:   -Xclang -analyzer-list-enabled-checkers \
 // RUN:   -Xclang -analyzer-display-progress \
 // RUN:   2>&1 | FileCheck %s --implicit-check-not=ANALYZE \