Author: Duncan P. N. Exon Smith
Date: 2022-05-03T11:57:24-07:00
New Revision: c1e17c7dfedd27b95c8c2fba2b6473c7348f0e77

URL: 
https://github.com/llvm/llvm-project/commit/c1e17c7dfedd27b95c8c2fba2b6473c7348f0e77
DIFF: 
https://github.com/llvm/llvm-project/commit/c1e17c7dfedd27b95c8c2fba2b6473c7348f0e77.diff

LOG: ExtractAPI: Use %clang_cc1 and -verify in enum.c

Fix one test (enum.c) in ExtractAPI to use %clang_cc1 and -verify
instead of calling the full driver and FileCheck. This is an example for
my comment from https://reviews.llvm.org/D121873.

Differential Revision: https://reviews.llvm.org/D124634

Added: 
    

Modified: 
    clang/test/ExtractAPI/enum.c

Removed: 
    


################################################################################
diff  --git a/clang/test/ExtractAPI/enum.c b/clang/test/ExtractAPI/enum.c
index a14666a037471..8c06d850dbdaf 100644
--- a/clang/test/ExtractAPI/enum.c
+++ b/clang/test/ExtractAPI/enum.c
@@ -2,17 +2,14 @@
 // RUN: split-file %s %t
 // RUN: sed -e "s@INPUT_DIR@%{/t:regex_replacement}@g" \
 // RUN: %t/reference.output.json.in >> %t/reference.output.json
-// RUN: %clang -extract-api -target arm64-apple-macosx \
-// RUN: %t/input.h -o %t/output.json | FileCheck -allow-empty %s
+// RUN: %clang_cc1 -extract-api -triple arm64-apple-macosx \
+// RUN:   -x c-header %t/input.h -o %t/output.json -verify
 
 // Generator version is not consistent across test runs, normalize it.
 // RUN: sed -e "s@\"generator\": \".*\"@\"generator\": \"?\"@g" \
 // RUN: %t/output.json >> %t/output-normalized.json
 // RUN: 
diff  %t/reference.output.json %t/output-normalized.json
 
-// CHECK-NOT: error:
-// CHECK-NOT: warning:
-
 //--- input.h
 /// Kinds of vehicles
 enum Vehicle {
@@ -37,6 +34,7 @@ enum {
 enum {
   OtherConstant = 2
 };
+// expected-no-diagnostics
 
 //--- reference.output.json.in
 {


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to