From e823d1e7eb3357fc5c15b614ac5fd94d331ac630 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Wed, 31 Jul 2024 10:12:59 -0400 Subject: [PATCH] Turn on mc_func check by default. --- clang/include/clang/Driver/Options.td | 2 +- clang/include/clang/Lex/PreprocessorOptions.h | 4 ++-- clang/lib/Driver/ToolChains/AIX.cpp | 2 +- clang/test/Preprocessor/pragma_mc_func.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index c8c56dbb51b28a..7f6b8ba4d7eebd 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -8097,7 +8097,7 @@ def source_date_epoch : Separate<["-"], "source-date-epoch">, } // let Visibility = [CC1Option] defm err_pragma_mc_func_aix : BoolFOption<"err-pragma-mc-func-aix", - PreprocessorOpts<"ErrorOnPragmaMcfuncOnAIX">, DefaultFalse, + PreprocessorOpts<"ErrorOnPragmaMcfuncOnAIX">, DefaultTrue, PosFlag, NegFlag&1 | FileCheck %s // RUN: not %clang --target=powerpc64-ibm-aix -ferr-pragma-mc-func-aix -fsyntax-only \ // RUN: %s 2>&1 | FileCheck %s #pragma mc_func asm_barrier {"60000000"} @@ -8,11 +9,10 @@ // RUN: %clang --target=powerpc64-ibm-aix -fno-err-pragma-mc-func-aix -fsyntax-only %s // RUN: %clang --target=powerpc64-ibm-aix -ferr-pragma-mc-func-aix -fsyntax-only \ // RUN: -fno-err-pragma-mc-func-aix %s -// RUN: %clang --target=powerpc64-ibm-aix -fsyntax-only %s // RUN: %clang --target=powerpc64-ibm-aix -Werror=unknown-pragmas \ // RUN: -fno-err-pragma-mc-func-aix -fsyntax-only %s -// Cases where we have errors or warnings. +// Cases on a non-AIX target. // RUN: not %clang --target=powerpc64le-unknown-linux-gnu \ // RUN: -Werror=unknown-pragmas -fno-err-pragma-mc-func-aix -fsyntax-only %s 2>&1 | \ // RUN: FileCheck --check-prefix=UNUSED %s