summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre@debian.org>2020-11-16 18:36:02 +0100
committerSylvestre Ledru <sylvestre@debian.org>2020-11-16 18:36:02 +0100
commitccfec4bf822255f7701fad1d2cad4a08103c4321 (patch)
treeb5fc02bb5fec51ca0ef71c07f81a39747b194851
parentd9212bfb7b17479aa40ae3671927aae6d37b833a (diff)
rebase of the patches
-rw-r--r--debian/patches/GlobalSourceManager.patch54
-rw-r--r--debian/patches/PrintableStmt.patch14
2 files changed, 34 insertions, 34 deletions
diff --git a/debian/patches/GlobalSourceManager.patch b/debian/patches/GlobalSourceManager.patch
index 9f40f13..b865b55 100644
--- a/debian/patches/GlobalSourceManager.patch
+++ b/debian/patches/GlobalSourceManager.patch
@@ -16,47 +16,47 @@ No functional change.
iwyu_ast_util.h | 42 ++++++++++++++++++------------------------
3 files changed, 32 insertions(+), 39 deletions(-)
-diff --git a/iwyu.cc b/iwyu.cc
-index 8f934273..931d57b6 100644
---- a/iwyu.cc
-+++ b/iwyu.cc
-@@ -322,7 +322,7 @@ class BaseAstVisitor : public RecursiveASTVisitor<Derived> {
+Index: iwyu/iwyu.cc
+===================================================================
+--- iwyu.orig/iwyu.cc
++++ iwyu/iwyu.cc
+@@ -329,7 +329,7 @@ class BaseAstVisitor : public RecursiveA
bool TraverseDecl(Decl* decl) {
- if (current_ast_node_ && current_ast_node_->StackContainsContent(decl))
+ if (current_ast_node_->StackContainsContent(decl))
return true; // avoid recursion
- ASTNode node(decl, *GlobalSourceManager());
+ ASTNode node(decl);
CurrentASTNodeUpdater canu(&current_ast_node_, &node);
return Base::TraverseDecl(decl);
}
-@@ -330,7 +330,7 @@ class BaseAstVisitor : public RecursiveASTVisitor<Derived> {
+@@ -337,7 +337,7 @@ class BaseAstVisitor : public RecursiveA
bool TraverseStmt(Stmt* stmt) {
- if (current_ast_node_ && current_ast_node_->StackContainsContent(stmt))
+ if (current_ast_node_->StackContainsContent(stmt))
return true; // avoid recursion
- ASTNode node(stmt, *GlobalSourceManager());
+ ASTNode node(stmt);
CurrentASTNodeUpdater canu(&current_ast_node_, &node);
return Base::TraverseStmt(stmt);
}
-@@ -341,7 +341,7 @@ class BaseAstVisitor : public RecursiveASTVisitor<Derived> {
+@@ -348,7 +348,7 @@ class BaseAstVisitor : public RecursiveA
const Type* type = qualtype.getTypePtr();
- if (current_ast_node_ && current_ast_node_->StackContainsContent(type))
+ if (current_ast_node_->StackContainsContent(type))
return true; // avoid recursion
- ASTNode node(type, *GlobalSourceManager());
+ ASTNode node(type);
CurrentASTNodeUpdater canu(&current_ast_node_, &node);
return Base::TraverseType(qualtype);
}
-@@ -365,7 +365,7 @@ class BaseAstVisitor : public RecursiveASTVisitor<Derived> {
+@@ -372,7 +372,7 @@ class BaseAstVisitor : public RecursiveA
}
- if (current_ast_node_ && current_ast_node_->StackContainsContent(&typeloc))
+ if (current_ast_node_->StackContainsContent(&typeloc))
return true; // avoid recursion
- ASTNode node(&typeloc, *GlobalSourceManager());
+ ASTNode node(&typeloc);
CurrentASTNodeUpdater canu(&current_ast_node_, &node);
return Base::TraverseTypeLoc(typeloc);
}
-@@ -373,7 +373,7 @@ class BaseAstVisitor : public RecursiveASTVisitor<Derived> {
+@@ -380,7 +380,7 @@ class BaseAstVisitor : public RecursiveA
bool TraverseNestedNameSpecifier(NestedNameSpecifier* nns) {
if (nns == nullptr)
return true;
@@ -65,7 +65,7 @@ index 8f934273..931d57b6 100644
CurrentASTNodeUpdater canu(&current_ast_node_, &node);
if (!this->getDerived().VisitNestedNameSpecifier(nns))
return false;
-@@ -383,7 +383,7 @@ class BaseAstVisitor : public RecursiveASTVisitor<Derived> {
+@@ -390,7 +390,7 @@ class BaseAstVisitor : public RecursiveA
bool TraverseNestedNameSpecifierLoc(NestedNameSpecifierLoc nns_loc) {
if (!nns_loc) // using NNSLoc::operator bool()
return true;
@@ -74,7 +74,7 @@ index 8f934273..931d57b6 100644
CurrentASTNodeUpdater canu(&current_ast_node_, &node);
// TODO(csilvers): have VisitNestedNameSpecifierLoc instead.
if (!this->getDerived().VisitNestedNameSpecifier(
-@@ -393,7 +393,7 @@ class BaseAstVisitor : public RecursiveASTVisitor<Derived> {
+@@ -400,7 +400,7 @@ class BaseAstVisitor : public RecursiveA
}
bool TraverseTemplateName(TemplateName template_name) {
@@ -83,7 +83,7 @@ index 8f934273..931d57b6 100644
CurrentASTNodeUpdater canu(&current_ast_node_, &node);
if (!this->getDerived().VisitTemplateName(template_name))
return false;
-@@ -401,7 +401,7 @@ class BaseAstVisitor : public RecursiveASTVisitor<Derived> {
+@@ -408,7 +408,7 @@ class BaseAstVisitor : public RecursiveA
}
bool TraverseTemplateArgument(const TemplateArgument& arg) {
@@ -92,7 +92,7 @@ index 8f934273..931d57b6 100644
CurrentASTNodeUpdater canu(&current_ast_node_, &node);
if (!this->getDerived().VisitTemplateArgument(arg))
return false;
-@@ -409,7 +409,7 @@ class BaseAstVisitor : public RecursiveASTVisitor<Derived> {
+@@ -416,7 +416,7 @@ class BaseAstVisitor : public RecursiveA
}
bool TraverseTemplateArgumentLoc(const TemplateArgumentLoc& argloc) {
@@ -101,7 +101,7 @@ index 8f934273..931d57b6 100644
CurrentASTNodeUpdater canu(&current_ast_node_, &node);
if (!this->getDerived().VisitTemplateArgumentLoc(argloc))
return false;
-@@ -3967,7 +3967,7 @@ class IwyuAstConsumer
+@@ -3940,7 +3940,7 @@ class IwyuAstConsumer
if (const TemplateSpecializationType* arg_tmpl = DynCastFrom(arg_type)) {
// Special case: We are instantiating the type in the context of an
// expression. Need to push the type to the AST stack explicitly.
@@ -110,11 +110,11 @@ index 8f934273..931d57b6 100644
node.SetParent(current_ast_node());
instantiated_template_visitor_.ScanInstantiatedType(
-diff --git a/iwyu_ast_util.cc b/iwyu_ast_util.cc
-index b19a11fb..1d37a175 100644
---- a/iwyu_ast_util.cc
-+++ b/iwyu_ast_util.cc
-@@ -186,13 +186,12 @@ SourceLocation ASTNode::GetLocation() const {
+Index: iwyu/iwyu_ast_util.cc
+===================================================================
+--- iwyu.orig/iwyu_ast_util.cc
++++ iwyu/iwyu_ast_util.cc
+@@ -183,13 +183,12 @@ SourceLocation ASTNode::GetLocation() co
// locations are in a different file, then we're uncertain of our
// own location. Return an invalid location.
if (retval.isValid()) {
@@ -132,10 +132,10 @@ index b19a11fb..1d37a175 100644
if (spelling_file != instantiation_file)
return SourceLocation();
}
-diff --git a/iwyu_ast_util.h b/iwyu_ast_util.h
-index a66a1d4b..18ddf2d3 100644
---- a/iwyu_ast_util.h
-+++ b/iwyu_ast_util.h
+Index: iwyu/iwyu_ast_util.h
+===================================================================
+--- iwyu.orig/iwyu_ast_util.h
++++ iwyu/iwyu_ast_util.h
@@ -40,7 +40,6 @@ class ClassTemplateDecl;
class Expr;
class FunctionDecl;
diff --git a/debian/patches/PrintableStmt.patch b/debian/patches/PrintableStmt.patch
index 663a883..52bc05f 100644
--- a/debian/patches/PrintableStmt.patch
+++ b/debian/patches/PrintableStmt.patch
@@ -15,11 +15,11 @@ No functional change.
iwyu_ast_util.cc | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
-diff --git a/iwyu_ast_util.cc b/iwyu_ast_util.cc
-index d3d4dd1f..b19a11fb 100644
---- a/iwyu_ast_util.cc
-+++ b/iwyu_ast_util.cc
-@@ -25,6 +25,7 @@
+Index: iwyu/iwyu_ast_util.cc
+===================================================================
+--- iwyu.orig/iwyu_ast_util.cc
++++ iwyu/iwyu_ast_util.cc
+@@ -26,6 +26,7 @@
#include "llvm/Support/Casting.h"
#include "llvm/Support/raw_ostream.h"
#include "clang/AST/ASTContext.h"
@@ -27,7 +27,7 @@ index d3d4dd1f..b19a11fb 100644
#include "clang/AST/CanonicalType.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
-@@ -46,6 +47,7 @@ namespace clang {
+@@ -47,6 +48,7 @@ namespace clang {
class FileEntry;
} // namespace clang
@@ -35,7 +35,7 @@ index d3d4dd1f..b19a11fb 100644
using clang::BlockPointerType;
using clang::CXXConstructExpr;
using clang::CXXConstructorDecl;
-@@ -450,12 +452,14 @@ string PrintableDecl(const Decl* decl, bool terse/*=true*/) {
+@@ -440,12 +442,14 @@ string PrintableDecl(const Decl* decl, b
string PrintableStmt(const Stmt* stmt) {
std::string buffer;
raw_string_ostream ostream(buffer);