summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib/Index
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Index')
-rw-r--r--contrib/llvm/tools/clang/lib/Index/ASTLocation.cpp12
-rw-r--r--contrib/llvm/tools/clang/lib/Index/Analyzer.cpp4
-rw-r--r--contrib/llvm/tools/clang/lib/Index/GlobalCallGraph.cpp (renamed from contrib/llvm/tools/clang/lib/Index/CallGraph.cpp)10
3 files changed, 13 insertions, 13 deletions
diff --git a/contrib/llvm/tools/clang/lib/Index/ASTLocation.cpp b/contrib/llvm/tools/clang/lib/Index/ASTLocation.cpp
index 66b393e..fce6099 100644
--- a/contrib/llvm/tools/clang/lib/Index/ASTLocation.cpp
+++ b/contrib/llvm/tools/clang/lib/Index/ASTLocation.cpp
@@ -41,7 +41,6 @@ Decl *ASTLocation::getReferencedDecl() {
return 0;
switch (getKind()) {
- default: llvm_unreachable("Invalid Kind");
case N_Type:
return 0;
case N_Decl:
@@ -51,8 +50,8 @@ Decl *ASTLocation::getReferencedDecl() {
case N_Stmt:
return getDeclFromExpr(Stm);
}
-
- return 0;
+
+ llvm_unreachable("Invalid ASTLocation Kind!");
}
SourceRange ASTLocation::getSourceRange() const {
@@ -60,7 +59,6 @@ SourceRange ASTLocation::getSourceRange() const {
return SourceRange();
switch (getKind()) {
- default: llvm_unreachable("Invalid Kind");
case N_Decl:
return D->getSourceRange();
case N_Stmt:
@@ -70,8 +68,8 @@ SourceRange ASTLocation::getSourceRange() const {
case N_Type:
return AsTypeLoc().getLocalSourceRange();
}
-
- return SourceRange();
+
+ llvm_unreachable("Invalid ASTLocation Kind!");
}
void ASTLocation::print(raw_ostream &OS) const {
@@ -91,7 +89,7 @@ void ASTLocation::print(raw_ostream &OS) const {
case N_Stmt:
OS << "[Stmt: " << AsStmt()->getStmtClassName() << " ";
- AsStmt()->printPretty(OS, Ctx, 0, PrintingPolicy(Ctx.getLangOptions()));
+ AsStmt()->printPretty(OS, Ctx, 0, PrintingPolicy(Ctx.getLangOpts()));
break;
case N_NamedRef:
diff --git a/contrib/llvm/tools/clang/lib/Index/Analyzer.cpp b/contrib/llvm/tools/clang/lib/Index/Analyzer.cpp
index 6be35ab..f77e6ef 100644
--- a/contrib/llvm/tools/clang/lib/Index/Analyzer.cpp
+++ b/contrib/llvm/tools/clang/lib/Index/Analyzer.cpp
@@ -205,7 +205,7 @@ public:
assert(MsgD);
// Same interface ? We have a winner!
- if (MsgD == IFace)
+ if (declaresSameEntity(MsgD, IFace))
return true;
// If the message interface is a superclass of the original interface,
@@ -220,7 +220,7 @@ public:
if (IFace) {
Selector Sel = Msg->getSelector();
for (ObjCInterfaceDecl *Cls = MsgD; Cls; Cls = Cls->getSuperClass()) {
- if (Cls == IFace)
+ if (declaresSameEntity(Cls, IFace))
return true;
if (Cls->getMethod(Sel, IsInstanceMethod))
return false;
diff --git a/contrib/llvm/tools/clang/lib/Index/CallGraph.cpp b/contrib/llvm/tools/clang/lib/Index/GlobalCallGraph.cpp
index 741e781..a21b52a 100644
--- a/contrib/llvm/tools/clang/lib/Index/CallGraph.cpp
+++ b/contrib/llvm/tools/clang/lib/Index/GlobalCallGraph.cpp
@@ -1,4 +1,4 @@
-//== CallGraph.cpp - Call graph building ------------------------*- C++ -*--==//
+//== GlobalCallGraph.cpp - Call graph building ------------------*- C++ -*--==//
//
// The LLVM Compiler Infrastructure
//
@@ -11,15 +11,17 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Index/CallGraph.h"
+#include "clang/Index/GlobalCallGraph.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/StmtVisitor.h"
#include "llvm/Support/GraphWriter.h"
-using namespace clang;
-using namespace idx;
+using namespace clang::idx;
+using clang::FunctionDecl;
+using clang::DeclContext;
+using clang::ASTContext;
namespace {
class CGBuilder : public StmtVisitor<CGBuilder> {
OpenPOWER on IntegriCloud