зеркало из https://github.com/microsoft/clang-1.git
Silence some warnings produced by Clang, and add a missing header
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89051 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
48c32a7e7c
Коммит
6490ae5003
|
@ -15,6 +15,7 @@
|
|||
#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"
|
||||
|
|
|
@ -44,11 +44,6 @@ static ExplodedNode::Auditor* CreateUbiViz();
|
|||
// Basic type definitions.
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
namespace {
|
||||
class AnalysisConsumer;
|
||||
typedef void (*CodeAction)(AnalysisConsumer &C, AnalysisManager &M, Decl *D);
|
||||
} // end anonymous namespace
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Special PathDiagnosticClients.
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -68,6 +63,10 @@ CreatePlistHTMLDiagnosticClient(const std::string& prefix,
|
|||
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;
|
||||
|
@ -189,8 +188,9 @@ public:
|
|||
} // 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)));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -484,7 +484,7 @@ ASTLocation LocResolverBase::ResolveInDeclarator(Decl *D, Stmt *Stm,
|
|||
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);
|
||||
|
|
|
@ -325,5 +325,5 @@ void JumpScopeChecker::CheckJump(Stmt *From, Stmt *To,
|
|||
}
|
||||
|
||||
void Sema::DiagnoseInvalidJumps(Stmt *Body) {
|
||||
JumpScopeChecker(Body, *this);
|
||||
(void)JumpScopeChecker(Body, *this);
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ void clang::ParseAST(Preprocessor &PP, ASTConsumer *Consumer,
|
|||
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
|
||||
|
|
|
@ -1936,7 +1936,7 @@ void Sema::ActOnFinishCXXMemberSpecification(Scope* S, SourceLocation RLoc,
|
|||
}
|
||||
|
||||
if (RD->isAbstract())
|
||||
AbstractClassUsageDiagnoser(*this, RD);
|
||||
(void)AbstractClassUsageDiagnoser(*this, RD);
|
||||
|
||||
if (!RD->isDependentType() && !RD->isInvalidDecl())
|
||||
AddImplicitlyDeclaredMembersToClass(RD);
|
||||
|
|
Загрузка…
Ссылка в новой задаче