#ifndef LLVM_CLANG_ANALYSIS_ANALYSISCONTEXT_H
#define LLVM_CLANG_ANALYSIS_ANALYSISCONTEXT_H
+#include "clang/AST/Stmt.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/DenseMap.h"
// Basic type definitions.
//===----------------------------------------------------------------------===//
-namespace {
- class AnalysisConsumer;
- typedef void (*CodeAction)(AnalysisConsumer &C, AnalysisManager &M, Decl *D);
-} // end anonymous namespace
-
//===----------------------------------------------------------------------===//
// Special PathDiagnosticClients.
//===----------------------------------------------------------------------===//
namespace {
class VISIBILITY_HIDDEN AnalysisConsumer : public ASTConsumer {
+ public:
+ typedef void (*CodeAction)(AnalysisConsumer &C, AnalysisManager &M, Decl *D);
+
+ private:
typedef std::vector<CodeAction> Actions;
Actions FunctionActions;
Actions ObjCMethodActions;
} // end anonymous namespace
namespace llvm {
- template <> struct FoldingSetTrait<CodeAction> {
- static inline void Profile(CodeAction X, FoldingSetNodeID& ID) {
+ template <> struct FoldingSetTrait<AnalysisConsumer::CodeAction> {
+ static inline void Profile(AnalysisConsumer::CodeAction X,
+ FoldingSetNodeID& ID) {
ID.AddPointer(reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(X)));
}
};
assert(ContainsLocation(DInfo) &&
"Should visit only after verifying that loc is in range");
- TypeLocResolver(Ctx, Loc, D);
+ (void)TypeLocResolver(Ctx, Loc, D);
for (TypeLoc TL = DInfo->getTypeLoc(); TL; TL = TL.getNextTypeLoc())
if (ContainsLocation(TL))
return TypeLocResolver(Ctx, Loc, D).Visit(TL);
}
void Sema::DiagnoseInvalidJumps(Stmt *Body) {
- JumpScopeChecker(Body, *this);
+ (void)JumpScopeChecker(Body, *this);
}
Consumer->HandleTopLevelDecl(ADecl.getAsVal<DeclGroupRef>());
};
// Check for any pending objective-c implementation decl.
- while (ADecl = P.RetreivePendingObjCImpDecl())
+ while ((ADecl = P.RetreivePendingObjCImpDecl()))
Consumer->HandleTopLevelDecl(ADecl.getAsVal<DeclGroupRef>());
// process any TopLevelDecls generated by #pragma weak
}
if (RD->isAbstract())
- AbstractClassUsageDiagnoser(*this, RD);
+ (void)AbstractClassUsageDiagnoser(*this, RD);
if (!RD->isDependentType() && !RD->isInvalidDecl())
AddImplicitlyDeclaredMembersToClass(RD);