From e0168081e6f40e038e98aede893063a34f7e0a41 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sun, 25 Jan 2015 20:58:12 +0100 Subject: [PATCH] scan.h: less_name: generalize to any TypeDecl This will allow us to reuse the same structure for also comparing TypedefNameDecl pointers in a subsequent commit. Signed-off-by: Sven Verdoolaege --- scan.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scan.h b/scan.h index 61f61df..d9e5ea9 100644 --- a/scan.h +++ b/scan.h @@ -37,11 +37,11 @@ struct Independent { unsigned line; }; -/* Compare two RecordDecl pointers based on their names. +/* Compare two TypeDecl pointers based on their names. */ struct less_name { - bool operator()(const clang::RecordDecl *x, - const clang::RecordDecl *y) { + bool operator()(const clang::TypeDecl *x, + const clang::TypeDecl *y) { return x->getNameAsString().compare(y->getNameAsString()) < 0; } }; -- 2.11.4.GIT