]> granicus.if.org Git - clang/commit
The constructor for ASTUnit now takes a DiagnosticClient*, allowing uses of ASTUnit...
authorTed Kremenek <kremenek@apple.com>
Mon, 19 Oct 2009 21:44:57 +0000 (21:44 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 19 Oct 2009 21:44:57 +0000 (21:44 +0000)
commitfc0622155fa61349698a8fd0053773c37d9f7ac4
tree3cc6127faf1ce917fdea316e3f8b3c8edfa9bce9
parent8621d01b253e3f36976d75dd999bdc0f21d9e5d9
The constructor for ASTUnit now takes a DiagnosticClient*, allowing uses of ASTUnit to specify
alternate DiagnosticClients. To match this API, ASTUnit::LoadFromPCHFile() now takes a corresponding
DiagnosticClient* argument as well. The DiagnosticClient object is destroyed when the ASTUnit object
is destroyed.

The CIndex library now uses this API to create a 'IgnoreDiagnosticsClient' that simply silences
diagnostics when using the clang_createTranslationUnitFromSourceFile() function. This fixes
<rdar://problem/7312058>. This API can change in the future as we add more flexibility for clients.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84539 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Frontend/ASTUnit.h
lib/Frontend/ASTUnit.cpp
tools/CIndex/CIndex.cpp