FullSourceLoc(Loc, Context.getSourceManager()), DiagID);
}
-// This class implements layout specific to the Microsoft ABI.
-class MSRecordLayoutBuilder: public RecordLayoutBuilder {
-public:
- MSRecordLayoutBuilder(ASTContext& Ctx, EmptySubobjectMap *EmptySubobjects):
- RecordLayoutBuilder(Ctx, EmptySubobjects) {}
-
- virtual bool IsNearlyEmpty(const CXXRecordDecl *RD) const;
- virtual uint64_t GetVirtualPointersSize(const CXXRecordDecl *RD) const;
-};
+namespace {
+ // This class implements layout specific to the Microsoft ABI.
+ class MSRecordLayoutBuilder : public RecordLayoutBuilder {
+ public:
+ MSRecordLayoutBuilder(ASTContext& Ctx, EmptySubobjectMap *EmptySubobjects) :
+ RecordLayoutBuilder(Ctx, EmptySubobjects) {}
+
+ virtual bool IsNearlyEmpty(const CXXRecordDecl *RD) const;
+ virtual uint64_t GetVirtualPointersSize(const CXXRecordDecl *RD) const;
+ };
+}
bool MSRecordLayoutBuilder::IsNearlyEmpty(const CXXRecordDecl *RD) const {
// FIXME: Audit the corners
// NilArgChecker - Check for prohibited nil arguments to ObjC method calls.
//===----------------------------------------------------------------------===//
-class NilArgChecker : public CheckerVisitor<NilArgChecker> {
- APIMisuse *BT;
- void AuditNSString(CheckerContext &C, const ObjCMessageExpr* ME);
- void WarnNilArg(CheckerContext &C, const ObjCMessageExpr* ME, unsigned Arg);
-public:
- NilArgChecker() : BT(0) {}
- static void *getTag() { static int x = 0; return &x; }
- void PreVisitObjCMessageExpr(CheckerContext &C, const ObjCMessageExpr *ME);
-};
+namespace {
+ class NilArgChecker : public CheckerVisitor<NilArgChecker> {
+ APIMisuse *BT;
+ void WarnNilArg(CheckerContext &C, const ObjCMessageExpr* ME, unsigned Arg);
+ public:
+ NilArgChecker() : BT(0) {}
+ static void *getTag() { static int x = 0; return &x; }
+ void PreVisitObjCMessageExpr(CheckerContext &C, const ObjCMessageExpr *ME);
+ };
+}
void NilArgChecker::WarnNilArg(CheckerContext &C,
const clang::ObjCMessageExpr *ME,