[clang] de867c6 - [clang] Reformat
Nathan Sidwell via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 24 05:56:32 PDT 2022
Author: Nathan Sidwell
Date: 2022-03-24T05:56:23-07:00
New Revision: de867c6d6ed86851dcd0f9de1154db3d42a0ad63
URL: https://github.com/llvm/llvm-project/commit/de867c6d6ed86851dcd0f9de1154db3d42a0ad63
DIFF: https://github.com/llvm/llvm-project/commit/de867c6d6ed86851dcd0f9de1154db3d42a0ad63.diff
LOG: [clang] Reformat
Reformat some misindentation that is coincidentally close to a piece
being worked on.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D122314
Added:
Modified:
clang/lib/Index/USRGeneration.cpp
Removed:
################################################################################
diff --git a/clang/lib/Index/USRGeneration.cpp b/clang/lib/Index/USRGeneration.cpp
index 41edd431dd5b8..129114ebfaedc 100644
--- a/clang/lib/Index/USRGeneration.cpp
+++ b/clang/lib/Index/USRGeneration.cpp
@@ -549,22 +549,22 @@ void USRGenerator::VisitTagDecl(const TagDecl *D) {
if (const TypedefNameDecl *TD = D->getTypedefNameForAnonDecl()) {
Buf[off] = 'A';
Out << '@' << *TD;
- }
- else {
- if (D->isEmbeddedInDeclarator() && !D->isFreeStanding()) {
- printLoc(Out, D->getLocation(), Context->getSourceManager(), true);
} else {
- Buf[off] = 'a';
- if (auto *ED = dyn_cast<EnumDecl>(D)) {
- // Distinguish USRs of anonymous enums by using their first enumerator.
- auto enum_range = ED->enumerators();
- if (enum_range.begin() != enum_range.end()) {
- Out << '@' << **enum_range.begin();
+ if (D->isEmbeddedInDeclarator() && !D->isFreeStanding()) {
+ printLoc(Out, D->getLocation(), Context->getSourceManager(), true);
+ } else {
+ Buf[off] = 'a';
+ if (auto *ED = dyn_cast<EnumDecl>(D)) {
+ // Distinguish USRs of anonymous enums by using their first
+ // enumerator.
+ auto enum_range = ED->enumerators();
+ if (enum_range.begin() != enum_range.end()) {
+ Out << '@' << **enum_range.begin();
+ }
}
}
}
}
- }
// For a class template specialization, mangle the template arguments.
if (const ClassTemplateSpecializationDecl *Spec
More information about the cfe-commits
mailing list