Skip to content

Commit 40446a8

Browse files
committed
Add a FIXME to ASTUnit
1 parent 01c9500 commit 40446a8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/include/clang/Frontend/ASTUnit.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ class ASTUnit {
107107

108108
private:
109109
std::unique_ptr<LangOptions> LangOpts;
110+
// FIXME: The documentation on \c LoadFrom* member functions states that the
111+
// DiagnosticsEngine (and therefore DiagnosticOptions) must outlive the
112+
// returned ASTUnit. This is not the case. Enfore it by storing non-owning
113+
// pointers here.
110114
std::shared_ptr<DiagnosticOptions> DiagOpts;
111115
IntrusiveRefCntPtr<DiagnosticsEngine> Diagnostics;
112116
IntrusiveRefCntPtr<FileManager> FileMgr;

0 commit comments

Comments
 (0)