diff --git a/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp b/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp --- a/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp +++ b/clang/test/Analysis/auto-obj-dtors-cfg-output.cpp @@ -1,5 +1,5 @@ // RUN: %clang_analyze_cc1 -std=c++98 -fcxx-exceptions -fexceptions -analyzer-checker=debug.DumpCFG -analyzer-config cfg-rich-constructors=false %s > %t 2>&1 -// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX98,WARNINGS,CXX98-WARNINGS %s +// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX98,WARNINGS %s // RUN: %clang_analyze_cc1 -std=c++98 -fcxx-exceptions -fexceptions -analyzer-checker=debug.DumpCFG -analyzer-config cfg-rich-constructors=true %s > %t 2>&1 // RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX98,ANALYZER,CXX98-ANALYZER %s // RUN: %clang_analyze_cc1 -std=c++11 -fcxx-exceptions -fexceptions -analyzer-checker=debug.DumpCFG -analyzer-config cfg-rich-constructors=false %s > %t 2>&1 diff --git a/clang/test/Analysis/cfg-rich-constructors.cpp b/clang/test/Analysis/cfg-rich-constructors.cpp --- a/clang/test/Analysis/cfg-rich-constructors.cpp +++ b/clang/test/Analysis/cfg-rich-constructors.cpp @@ -1,11 +1,11 @@ // RUN: %clang_analyze_cc1 -analyzer-checker=debug.DumpCFG -triple x86_64-apple-darwin12 -std=c++11 -w %s > %t 2>&1 -// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX11,ELIDE,CXX11-ELIDE %s +// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX11,CXX11-ELIDE %s // RUN: %clang_analyze_cc1 -analyzer-checker=debug.DumpCFG -triple x86_64-apple-darwin12 -std=c++17 -w %s > %t 2>&1 -// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX17,ELIDE,CXX17-ELIDE %s +// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX17 %s // RUN: %clang_analyze_cc1 -analyzer-checker=debug.DumpCFG -triple x86_64-apple-darwin12 -std=c++11 -w -analyzer-config elide-constructors=false %s > %t 2>&1 -// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX11,NOELIDE,CXX11-NOELIDE %s +// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX11,CXX11-NOELIDE %s // RUN: %clang_analyze_cc1 -analyzer-checker=debug.DumpCFG -triple x86_64-apple-darwin12 -std=c++17 -w -analyzer-config elide-constructors=false %s > %t 2>&1 -// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX17,NOELIDE,CXX17-NOELIDE %s +// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX17 %s class C { public: diff --git a/clang/test/Analysis/cfg-rich-constructors.mm b/clang/test/Analysis/cfg-rich-constructors.mm --- a/clang/test/Analysis/cfg-rich-constructors.mm +++ b/clang/test/Analysis/cfg-rich-constructors.mm @@ -1,11 +1,11 @@ // RUN: %clang_analyze_cc1 -analyzer-checker=debug.DumpCFG -triple x86_64-apple-darwin12 -std=c++11 -w %s > %t 2>&1 -// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX11,ELIDE,CXX11-ELIDE %s +// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX11,CXX11-ELIDE %s // RUN: %clang_analyze_cc1 -analyzer-checker=debug.DumpCFG -triple x86_64-apple-darwin12 -std=c++17 -w %s > %t 2>&1 -// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX17,ELIDE,CXX17-ELIDE %s +// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX17 %s // RUN: %clang_analyze_cc1 -analyzer-checker=debug.DumpCFG -triple x86_64-apple-darwin12 -std=c++11 -w -analyzer-config elide-constructors=false %s > %t 2>&1 -// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX11,NOELIDE,CXX11-NOELIDE %s +// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX11,CXX11-NOELIDE %s // RUN: %clang_analyze_cc1 -analyzer-checker=debug.DumpCFG -triple x86_64-apple-darwin12 -std=c++17 -w -analyzer-config elide-constructors=false %s > %t 2>&1 -// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX17,NOELIDE,CXX17-NOELIDE %s +// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,CXX17 %s class D { public: diff --git a/clang/test/Analysis/cfg.c b/clang/test/Analysis/cfg.c --- a/clang/test/Analysis/cfg.c +++ b/clang/test/Analysis/cfg.c @@ -1,5 +1,5 @@ // RUN: %clang_analyze_cc1 -analyzer-checker=debug.DumpCFG -triple x86_64-apple-darwin12 -fheinous-gnu-extensions %s > %t 2>&1 -// RUN: FileCheck --input-file=%t -check-prefixes=CHECK,WARNINGS %s +// RUN: FileCheck --input-file=%t --check-prefix=CHECK %s // This file is the C version of cfg.cpp. // Tests that are C-specific should go into this file. diff --git a/clang/test/Analysis/exploded-graph-rewriter/trimmers.dot b/clang/test/Analysis/exploded-graph-rewriter/trimmers.dot --- a/clang/test/Analysis/exploded-graph-rewriter/trimmers.dot +++ b/clang/test/Analysis/exploded-graph-rewriter/trimmers.dot @@ -1,17 +1,17 @@ // RUN: %exploded_graph_rewriter %s \ // RUN: | FileCheck %s -check-prefixes=ONE,TWO,THREE,FOUR // RUN: %exploded_graph_rewriter -s %s \ -// RUN: | FileCheck %s -check-prefixes=ONE,TWO,NOTHREE,FOUR +// RUN: | FileCheck %s -check-prefixes=ONE,TWO,NOTTHREE,FOUR // RUN: %exploded_graph_rewriter --to=0x2 %s \ -// RUN: | FileCheck %s -check-prefixes=ONE,TWO,NOTHREE,NOFOUR +// RUN: | FileCheck %s -check-prefixes=ONE,TWO,NOTTHREE,NOTFOUR // RUN: %exploded_graph_rewriter --to 2 %s \ -// RUN: | FileCheck %s -check-prefixes=ONE,TWO,NOTHREE,NOFOUR +// RUN: | FileCheck %s -check-prefixes=ONE,TWO,NOTTHREE,NOTFOUR // RUN: %exploded_graph_rewriter --to 2,3 %s \ -// RUN: | FileCheck %s -check-prefixes=ONE,TWO,THREE,NOFOUR +// RUN: | FileCheck %s -check-prefixes=ONE,TWO,THREE,NOTFOUR // RUN: %exploded_graph_rewriter --to 4 %s \ // RUN: | FileCheck %s -check-prefixes=ONE,TWO,THREE,FOUR // RUN: %exploded_graph_rewriter --to 4 -s %s \ -// RUN: | FileCheck %s -check-prefixes=ONE,TWO,NOTHREE,FOUR +// RUN: | FileCheck %s -check-prefixes=ONE,TWO,NOTTHREE,FOUR Node0x1 [shape=record,label= "{{ "state_id": 0, "program_state": null, "program_points": [ diff --git a/clang/test/Analysis/lit.local.cfg b/clang/test/Analysis/lit.local.cfg --- a/clang/test/Analysis/lit.local.cfg +++ b/clang/test/Analysis/lit.local.cfg @@ -1,5 +1,5 @@ # -*- Python -*- vim: set ft=python ts=4 sw=4 expandtab tw=79: - +from lit.llvm.subst import ToolSubst import site # Load the custom analyzer test format, which runs the test again with Z3 if it @@ -26,3 +26,9 @@ if not config.root.clang_staticanalyzer: config.unsupported = True + +fc = ToolSubst('FileCheck', unresolved='fatal') +# Insert this first. Then, we'll first update the blank FileCheck command; then, +# the default substitution of FileCheck will replace it to its full path. +config.substitutions.insert(0, (fc.regex, + 'FileCheck --allow-unused-prefixes=false'))