summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol/ClangASTContext.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-04-10 20:48:55 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-04-10 20:48:55 +0000
commit8b3af63b8993e45b1783853a3fcf6f36bfbed81b (patch)
tree41759d08361beda32b90e345d8033aecd2e15088 /lldb/source/Symbol/ClangASTContext.cpp
parent66b6bb1766b3e5eea56b26fc91d03f1fccbe15e4 (diff)
downloadbcm5719-llvm-8b3af63b8993e45b1783853a3fcf6f36bfbed81b.tar.gz
bcm5719-llvm-8b3af63b8993e45b1783853a3fcf6f36bfbed81b.zip
[NFC] Remove ASCII lines from comments
A lot of comments in LLDB are surrounded by an ASCII line to delimit the begging and end of the comment. Its use is not really consistent across the code base, sometimes the lines are longer, sometimes they are shorter and sometimes they are omitted. Furthermore, it looks kind of weird with the 80 column limit, where the comment actually extends past the line, but not by much. Furthermore, when /// is used for Doxygen comments, it looks particularly odd. And when // is used, it incorrectly gives the impression that it's actually a Doxygen comment. I assume these lines were added to improve distinguishing between comments and code. However, given that todays editors and IDEs do a great job at highlighting comments, I think it's worth to drop this for the sake of consistency. The alternative is fixing all the inconsistencies, which would create a lot more churn. Differential revision: https://reviews.llvm.org/D60508 llvm-svn: 358135
Diffstat (limited to 'lldb/source/Symbol/ClangASTContext.cpp')
-rw-r--r--lldb/source/Symbol/ClangASTContext.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index 28b5a184b42..9a8de48c1c9 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -663,9 +663,7 @@ ClangASTContext::ClangASTContext(const char *target_triple)
SetTargetTriple(target_triple);
}
-//----------------------------------------------------------------------
// Destructor
-//----------------------------------------------------------------------
ClangASTContext::~ClangASTContext() { Finalize(); }
ConstString ClangASTContext::GetPluginNameStatic() {
@@ -2435,17 +2433,13 @@ void ClangASTContext::DumpDeclHiearchy(clang::Decl *decl) {
bool ClangASTContext::DeclsAreEquivalent(clang::Decl *lhs_decl,
clang::Decl *rhs_decl) {
if (lhs_decl && rhs_decl) {
- //----------------------------------------------------------------------
// Make sure the decl kinds match first
- //----------------------------------------------------------------------
const clang::Decl::Kind lhs_decl_kind = lhs_decl->getKind();
const clang::Decl::Kind rhs_decl_kind = rhs_decl->getKind();
if (lhs_decl_kind == rhs_decl_kind) {
- //------------------------------------------------------------------
// Now check that the decl contexts kinds are all equivalent before we
// have to check any names of the decl contexts...
- //------------------------------------------------------------------
clang::DeclContext *lhs_decl_ctx = lhs_decl->getDeclContext();
clang::DeclContext *rhs_decl_ctx = rhs_decl->getDeclContext();
if (lhs_decl_ctx && rhs_decl_ctx) {
@@ -2467,9 +2461,7 @@ bool ClangASTContext::DeclsAreEquivalent(clang::Decl *lhs_decl,
return false;
}
- //--------------------------------------------------------------
// Now make sure the name of the decls match
- //--------------------------------------------------------------
clang::NamedDecl *lhs_named_decl =
llvm::dyn_cast<clang::NamedDecl>(lhs_decl);
clang::NamedDecl *rhs_named_decl =
@@ -2485,10 +2477,8 @@ bool ClangASTContext::DeclsAreEquivalent(clang::Decl *lhs_decl,
} else
return false;
- //--------------------------------------------------------------
// We know that the decl context kinds all match, so now we need to
// make sure the names match as well
- //--------------------------------------------------------------
lhs_decl_ctx = lhs_decl->getDeclContext();
rhs_decl_ctx = rhs_decl->getDeclContext();
while (1) {
@@ -2830,9 +2820,7 @@ ConvertAccessTypeToObjCIvarAccessControl(AccessType access) {
return clang::ObjCIvarDecl::None;
}
-//----------------------------------------------------------------------
// Tests
-//----------------------------------------------------------------------
bool ClangASTContext::IsAggregateType(lldb::opaque_compiler_type_t type) {
clang::QualType qual_type(GetCanonicalQualType(type));
@@ -3994,9 +3982,7 @@ bool ClangASTContext::GetObjCClassName(const CompilerType &type,
return false;
}
-//----------------------------------------------------------------------
// Type Completion
-//----------------------------------------------------------------------
bool ClangASTContext::GetCompleteType(lldb::opaque_compiler_type_t type) {
if (!type)
@@ -4485,9 +4471,7 @@ unsigned ClangASTContext::GetTypeQualifiers(lldb::opaque_compiler_type_t type) {
return 0;
}
-//----------------------------------------------------------------------
// Creating related types
-//----------------------------------------------------------------------
CompilerType
ClangASTContext::GetArrayElementType(lldb::opaque_compiler_type_t type,
@@ -4999,16 +4983,12 @@ ClangASTContext::GetTypedefedType(lldb::opaque_compiler_type_t type) {
return CompilerType();
}
-//----------------------------------------------------------------------
// Create related types using the current type's AST
-//----------------------------------------------------------------------
CompilerType ClangASTContext::GetBasicTypeFromAST(lldb::BasicType basic_type) {
return ClangASTContext::GetBasicType(getASTContext(), basic_type);
}
-//----------------------------------------------------------------------
// Exploring the type
-//----------------------------------------------------------------------
Optional<uint64_t>
ClangASTContext::GetBitSize(lldb::opaque_compiler_type_t type,
@@ -9081,9 +9061,7 @@ ClangASTContext::ConvertStringToFloatValue(lldb::opaque_compiler_type_t type,
return 0;
}
-//----------------------------------------------------------------------
// Dumping types
-//----------------------------------------------------------------------
#define DEPTH_INCREMENT 2
#ifndef NDEBUG
@@ -9921,9 +9899,7 @@ bool ClangASTContext::LayoutRecordType(
field_offsets, base_offsets, vbase_offsets);
}
-//----------------------------------------------------------------------
// CompilerDecl override functions
-//----------------------------------------------------------------------
ConstString ClangASTContext::DeclGetName(void *opaque_decl) {
if (opaque_decl) {
@@ -10011,9 +9987,7 @@ CompilerType ClangASTContext::DeclGetFunctionArgumentType(void *opaque_decl,
return CompilerType();
}
-//----------------------------------------------------------------------
// CompilerDeclContext functions
-//----------------------------------------------------------------------
std::vector<CompilerDecl> ClangASTContext::DeclContextFindDeclByName(
void *opaque_decl_ctx, ConstString name, const bool ignore_using_decls) {
OpenPOWER on IntegriCloud