[cfe-commits] r89051 - in /cfe/trunk: include/clang/Analysis/PathSensitive/AnalysisContext.h lib/Frontend/AnalysisConsumer.cpp lib/Index/ResolveLocation.cpp lib/Sema/JumpDiagnostics.cpp lib/Sema/ParseAST.cpp lib/Sema/SemaDeclCXX.cpp
Douglas Gregor
dgregor at apple.com
Mon Nov 16 22:14:37 PST 2009
Author: dgregor
Date: Tue Nov 17 00:14:37 2009
New Revision: 89051
URL: http://llvm.org/viewvc/llvm-project?rev=89051&view=rev
Log:
Silence some warnings produced by Clang, and add a missing header
Modified:
cfe/trunk/include/clang/Analysis/PathSensitive/AnalysisContext.h
cfe/trunk/lib/Frontend/AnalysisConsumer.cpp
cfe/trunk/lib/Index/ResolveLocation.cpp
cfe/trunk/lib/Sema/JumpDiagnostics.cpp
cfe/trunk/lib/Sema/ParseAST.cpp
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Modified: cfe/trunk/include/clang/Analysis/PathSensitive/AnalysisContext.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/AnalysisContext.h?rev=89051&r1=89050&r2=89051&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/AnalysisContext.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/AnalysisContext.h Tue Nov 17 00:14:37 2009
@@ -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"
Modified: cfe/trunk/lib/Frontend/AnalysisConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/AnalysisConsumer.cpp?rev=89051&r1=89050&r2=89051&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/AnalysisConsumer.cpp (original)
+++ cfe/trunk/lib/Frontend/AnalysisConsumer.cpp Tue Nov 17 00:14:37 2009
@@ -44,11 +44,6 @@
// Basic type definitions.
//===----------------------------------------------------------------------===//
-namespace {
- class AnalysisConsumer;
- typedef void (*CodeAction)(AnalysisConsumer &C, AnalysisManager &M, Decl *D);
-} // end anonymous namespace
-
//===----------------------------------------------------------------------===//
// Special PathDiagnosticClients.
//===----------------------------------------------------------------------===//
@@ -68,6 +63,10 @@
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 @@
} // 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)));
}
};
Modified: cfe/trunk/lib/Index/ResolveLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/ResolveLocation.cpp?rev=89051&r1=89050&r2=89051&view=diff
==============================================================================
--- cfe/trunk/lib/Index/ResolveLocation.cpp (original)
+++ cfe/trunk/lib/Index/ResolveLocation.cpp Tue Nov 17 00:14:37 2009
@@ -484,7 +484,7 @@
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);
Modified: cfe/trunk/lib/Sema/JumpDiagnostics.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/JumpDiagnostics.cpp?rev=89051&r1=89050&r2=89051&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/JumpDiagnostics.cpp (original)
+++ cfe/trunk/lib/Sema/JumpDiagnostics.cpp Tue Nov 17 00:14:37 2009
@@ -325,5 +325,5 @@
}
void Sema::DiagnoseInvalidJumps(Stmt *Body) {
- JumpScopeChecker(Body, *this);
+ (void)JumpScopeChecker(Body, *this);
}
Modified: cfe/trunk/lib/Sema/ParseAST.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/ParseAST.cpp?rev=89051&r1=89050&r2=89051&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/ParseAST.cpp (original)
+++ cfe/trunk/lib/Sema/ParseAST.cpp Tue Nov 17 00:14:37 2009
@@ -72,7 +72,7 @@
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
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=89051&r1=89050&r2=89051&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Tue Nov 17 00:14:37 2009
@@ -1936,7 +1936,7 @@
}
if (RD->isAbstract())
- AbstractClassUsageDiagnoser(*this, RD);
+ (void)AbstractClassUsageDiagnoser(*this, RD);
if (!RD->isDependentType() && !RD->isInvalidDecl())
AddImplicitlyDeclaredMembersToClass(RD);
More information about the cfe-commits
mailing list