[cfe-dev] diagnostics spliting

Chris Lattner clattner at apple.com
Tue Jan 27 22:35:06 PST 2009


Hi Anders,

Thanks for working on the diagnostics split-up patch.  Now that the  
initial patch went into the tree, are you willing to do some cleanup?   
In particular, I think that the per-library headers (but not the .def  
files) should move into the per-library header dir.  For example  
DiagnosticSema.h should be in include/clang/Sema instead of clang/ 
Basic.  Also, I think that the number of #includes can now go way  
down.  In sema, for example, I see:

$ grep DiagnosticSema.h lib/*/*
lib/Sema/Sema.cpp:#include "clang/Basic/DiagnosticSema.h"
lib/Sema/Sema.h:#include "clang/Basic/DiagnosticSema.h"
lib/Sema/SemaCXXScopeSpec.cpp:#include "clang/Basic/DiagnosticSema.h"
lib/Sema/SemaChecking.cpp:#include "clang/Basic/DiagnosticSema.h"
lib/Sema/SemaDecl.cpp:#include "clang/Basic/DiagnosticSema.h"
lib/Sema/SemaDeclAttr.cpp:#include "clang/Basic/DiagnosticSema.h"
lib/Sema/SemaDeclCXX.cpp:#include "clang/Basic/DiagnosticSema.h"
lib/Sema/SemaDeclObjC.cpp:#include "clang/Basic/DiagnosticSema.h"
lib/Sema/SemaExpr.cpp:#include "clang/Basic/DiagnosticSema.h"
lib/Sema/SemaExprCXX.cpp:#include "clang/Basic/DiagnosticSema.h"
lib/Sema/SemaExprObjC.cpp:#include "clang/Basic/DiagnosticSema.h"
lib/Sema/SemaInherit.cpp:#include "clang/Basic/DiagnosticSema.h"
lib/Sema/SemaInit.cpp:#include "clang/Basic/DiagnosticSema.h"
lib/Sema/SemaNamedCast.cpp:#include "clang/Basic/DiagnosticSema.h"
lib/Sema/SemaStmt.cpp:#include "clang/Basic/DiagnosticSema.h"
lib/Sema/SemaType.cpp:#include "clang/Basic/DiagnosticSema.h"

I think that all of those can be removed except Sema.h, since they all  
include sema.h.  I'm sure other libraries can also be simplified along  
similar lines.

Thank you for working on this!

-Chris



More information about the cfe-dev mailing list