From: Hans Wennborg Date: Wed, 19 Feb 2014 02:10:19 +0000 (+0000) Subject: clang-cl /fallback: turn the note into a warning X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=36e5e19d56fdb3e0e32b51662c4ae2d69a9972b6;p=clang clang-cl /fallback: turn the note into a warning git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201626 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticDriverKinds.td b/include/clang/Basic/DiagnosticDriverKinds.td index 214b203dfb..f100b57d07 100644 --- a/include/clang/Basic/DiagnosticDriverKinds.td +++ b/include/clang/Basic/DiagnosticDriverKinds.td @@ -171,5 +171,6 @@ def err_drv_modules_validate_once_requires_timestamp : Error< "option '-fmodules-validate-once-per-build-session' requires " "'-fbuild-session-timestamp='">; -def note_drv_invoking_fallback : Note<"falling back to %0">; +def warn_drv_invoking_fallback : Warning<"falling back to %0">, + InGroup>; } diff --git a/lib/Driver/Job.cpp b/lib/Driver/Job.cpp index 7fd43e3c56..2775d892f7 100644 --- a/lib/Driver/Job.cpp +++ b/lib/Driver/Job.cpp @@ -164,8 +164,7 @@ int FallbackCommand::Execute(const StringRef **Redirects, std::string *ErrMsg, *ExecutionFailed = false; const Driver &D = getCreator().getToolChain().getDriver(); - D.Diag(diag::note_drv_invoking_fallback).setForceEmit() - << Fallback->getExecutable(); + D.Diag(diag::warn_drv_invoking_fallback) << Fallback->getExecutable(); int SecondaryStatus = Fallback->Execute(Redirects, ErrMsg, ExecutionFailed); return SecondaryStatus; diff --git a/test/Driver/cl-fallback.c b/test/Driver/cl-fallback.c index 2e59ccdbba..d67fa42ca8 100644 --- a/test/Driver/cl-fallback.c +++ b/test/Driver/cl-fallback.c @@ -46,7 +46,7 @@ // P-NOT: "cl.exe" // RUN: not %clang_cl /fallback /c -- %s 2>&1 | \ -// RUN: FileCheck -check-prefix=ErrNote %s -// ErrNote: note: falling back to {{.*}}cl.exe +// RUN: FileCheck -check-prefix=ErrWarn %s +// ErrWarn: warning: falling back to {{.*}}cl.exe #error "This fails to compile."