Files
swift-mirror/include/swift/AST/DiagnosticsClangImporter.h
Jordan Rose a012602f62 [ClangImporter] Pass diagnostics through to Swift's diagnostic consumer.
We're not mapping source locations over correctly yet, so the file name
where an error occurs gets shoved into the diagnostic text, but that's
fine for now.

This also silences the "module 'Blah' not found" error coming from the
importer whenever Swift itself can be responsible for importing the module.

Still to do: if we can't build a Clang module, we shouldn't report that
error and then say it can't be found.

<rdar://problem/14509389>

Swift SVN r18230
2014-05-17 00:23:44 +00:00

33 lines
1.1 KiB
C++

//===- DiagnosticsClangImporter.h - Diagnostic Definitions ------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
/// \file
/// \brief This file defines diagnostics for the Clang importer.
//
//===----------------------------------------------------------------------===//
#ifndef SWIFT_DIAGNOSTICSCLANGIMPORTER_H
#define SWIFT_DIAGNOSTICSCLANGIMPORTER_H
#include "swift/AST/DiagnosticsCommon.h"
namespace swift {
namespace diag {
// Declare common diagnostics objects with their appropriate types.
#define DIAG(KIND,ID,Category,Options,Text,Signature) \
extern detail::DiagWithArguments<void Signature>::type ID;
#include "DiagnosticsClangImporter.def"
}
}
#endif