Author: Jonas Devlieghere Date: 2019-11-13T14:40:55-08:00 New Revision: 8df482e51c5508203af348589391c776ba8112f8
URL: https://github.com/llvm/llvm-project/commit/8df482e51c5508203af348589391c776ba8112f8 DIFF: https://github.com/llvm/llvm-project/commit/8df482e51c5508203af348589391c776ba8112f8.diff LOG: [LLDB] Fix a bunch of -Wdocumentation warnings in ExpressionParser Added: Modified: lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h Removed: ################################################################################ diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h b/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h index 670ba6dce72e..0b0f3b97705d 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h @@ -135,18 +135,11 @@ class ASTResultSynthesizer : public clang::SemaConsumer { void RecordPersistentTypes(clang::DeclContext *FunDeclCtx); /// Given a TypeDecl, if it declares a type whose name starts with a dollar - /// sign, register it as a pointer type in the target's scratch - /// AST context. - /// - /// \param[in] Body - /// The body of the function. + /// sign, register it as a pointer type in the target's scratch AST context. void MaybeRecordPersistentType(clang::TypeDecl *D); /// Given a NamedDecl, register it as a pointer type in the target's scratch /// AST context. - /// - /// \param[in] Body - /// The body of the function. void RecordPersistentDecl(clang::NamedDecl *D); clang::ASTContext diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h index 7a8bacf48a8f..cfb81482d832 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h @@ -89,7 +89,7 @@ class ClangASTSource : public ClangExternalASTSourceCommon, /// \param[in] DC /// The DeclContext being searched. /// - /// \param[in] isKindWeWant + /// \param[in] IsKindWeWant /// A callback function that returns true given the /// DeclKinds of desired Decls, and false otherwise. /// @@ -155,7 +155,7 @@ class ClangASTSource : public ClangExternalASTSourceCommon, /// setHasExternalVisibleStorage() and setHasExternalLexicalStorage() that /// this object has something to say about undefined names. /// - /// \param[in] ASTConsumer + /// \param[in] Consumer /// Unused. void StartTranslationUnit(clang::ASTConsumer *Consumer) override; @@ -321,13 +321,6 @@ class ClangASTSource : public ClangExternalASTSourceCommon, /// A wrapper for ClangASTContext::CopyType that sets a flag that /// indicates that we should not respond to queries during import. /// - /// \param[in] dest_context - /// The target AST context, typically the parser's AST context. - /// - /// \param[in] source_context - /// The source AST context, typically the AST context of whatever - /// symbol file the type was found in. - /// /// \param[in] src_type /// The source type. /// @@ -341,7 +334,7 @@ class ClangASTSource : public ClangExternalASTSourceCommon, /// \param[in] name /// The name to be considered. /// - /// \param[in] ignore_all_dollar_nmmes + /// \param[in] ignore_all_dollar_names /// True if $-names of all sorts should be ignored. /// /// \return @@ -358,7 +351,7 @@ class ClangASTSource : public ClangExternalASTSourceCommon, /// \return /// A copy of the Decl in m_ast_context, or NULL if the copy failed. clang::Decl *CopyDecl(clang::Decl *src_decl); - + /// Copies a single Type to the target of the given ExternalASTMerger. /// /// \param[in] src_context @@ -392,11 +385,11 @@ class ClangASTSource : public ClangExternalASTSourceCommon, /// True if lookup succeeded; false otherwise. bool ResolveDeclOrigin(const clang::Decl *decl, clang::Decl **original_decl, clang::ASTContext **original_ctx); - + /// Returns m_merger_up. Only call this if the target is configured to use /// modern lookup, clang::ExternalASTMerger &GetMergerUnchecked(); - + /// Returns true if there is a merger. This only occurs if the target is /// using modern lookup. bool HasMerger() { return (bool)m_merger_up; } diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h index 2711e90726e7..39b143022809 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h @@ -63,7 +63,7 @@ class ClangExpressionDeclMap : public ClangASTSource { /// the result persistent variable, and instead marks the variable /// as persisting. /// - /// \param[in] delegate + /// \param[in] result_delegate /// If non-NULL, use this delegate to report result values. This /// allows the client ClangUserExpression to report a result. /// @@ -248,17 +248,6 @@ class ClangExpressionDeclMap : public ClangASTSource { lldb::addr_t GetSymbolAddress(ConstString name, lldb::SymbolType symbol_type); - /// [Used by IRInterpreter] Get basic target information. - /// - /// \param[out] byte_order - /// The byte order of the target. - /// - /// \param[out] address_byte_size - /// The size of a pointer in bytes. - /// - /// \return - /// True if the information could be determined; false - /// otherwise. struct TargetInfo { lldb::ByteOrder byte_order; size_t address_byte_size; @@ -276,9 +265,6 @@ class ClangExpressionDeclMap : public ClangASTSource { /// /// \param[in] context /// The NameSearchContext that can construct Decls for this name. - /// - /// \return - /// True on success; false otherwise. void FindExternalVisibleDecls(NameSearchContext &context) override; /// Find all entities matching a given name in a given module/namespace, @@ -296,9 +282,6 @@ class ClangExpressionDeclMap : public ClangASTSource { /// \param[in] current_id /// The ID for the current FindExternalVisibleDecls invocation, /// for logging purposes. - /// - /// \return - /// True on success; false otherwise. void FindExternalVisibleDecls(NameSearchContext &context, lldb::ModuleSP module, CompilerDeclContext &namespace_decl, @@ -441,9 +424,6 @@ class ClangExpressionDeclMap : public ClangASTSource { /// AST context. This is only useful when the variable is being /// inspected on behalf of the parser, hence the default. /// - /// \param[in] decl - /// The Decl to be looked up. - /// /// \return /// Return true if the value was successfully filled in. bool GetVariableValue(lldb::VariableSP &var, @@ -471,7 +451,7 @@ class ClangExpressionDeclMap : public ClangASTSource { /// \param[in] context /// The NameSearchContext to use when constructing the Decl. /// - /// \param[in] pvar + /// \param[in] pvar_sp /// The persistent variable that needs a Decl. /// /// \param[in] current_id @@ -483,12 +463,6 @@ class ClangExpressionDeclMap : public ClangASTSource { /// Use the NameSearchContext to generate a Decl for the given LLDB symbol /// (treated as a variable), and put it in the list of found entities. - /// - /// \param[in] context - /// The NameSearchContext to use when constructing the Decl. - /// - /// \param[in] var - /// The LLDB Variable that needs a Decl. void AddOneGenericVariable(NameSearchContext &context, const Symbol &symbol, unsigned int current_id); diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h index 3741cf8e18b6..4a410cecb94a 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h @@ -42,7 +42,7 @@ class ClangExpressionParser : public ExpressionParser { /// /// Initializes class variables. /// - /// \param[in] exe_scope, + /// \param[in] exe_scope /// If non-NULL, an execution context scope that can help to /// correctly create an expression with a valid process for /// optional tuning Objective-C runtime support. Can be NULL. @@ -99,15 +99,6 @@ class ClangExpressionParser : public ExpressionParser { /// \param[in] exe_ctx /// The execution context to write the function into. /// - /// \param[out] evaluated_statically - /// Set to true if the expression could be interpreted statically; - /// untouched otherwise. - /// - /// \param[out] const_result - /// If the result of the expression is constant, and the - /// expression has no side effects, this is set to the result of the - /// expression. - /// /// \param[in] execution_policy /// Determines whether the expression must be JIT-compiled, must be /// evaluated statically, or whether this decision may be made diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h index abfd4e52ef6f..150a913152d0 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h @@ -101,9 +101,6 @@ class ClangFunctionCaller : public FunctionCaller { /// An execution context scope that gets us at least a target and /// process. /// - /// \param[in] ast_context - /// The AST context to evaluate argument types in. - /// /// \param[in] return_type /// A compiler type for the function result. Should be /// defined in ast_context. diff --git a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h index 893620f7f8e0..262e8ee0c06c 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h @@ -71,15 +71,6 @@ class IRForTarget : public llvm::ModulePass { /// variables) should be resolved. If not, only external functions /// are resolved. /// - /// \param[in] execution_policy - /// Determines whether an IR interpreter can be used to statically - /// evaluate the expression. - /// - /// \param[in] const_result - /// This variable is populated with the statically-computed result - /// of the function, if it has no side-effects and the result can - /// be computed statically. - /// /// \param[in] execution_unit /// The holder for raw data associated with the expression. /// @@ -105,10 +96,6 @@ class IRForTarget : public llvm::ModulePass { /// $__lldb_expr, and that function is passed to the passes one by /// one. /// - /// \param[in] interpreter_error - /// An error. If the expression fails to be interpreted, this error - /// is set to a reason why. - /// /// \return /// True on success; false otherwise bool runOnModule(llvm::Module &llvm_module) override; @@ -142,9 +129,6 @@ class IRForTarget : public llvm::ModulePass { /// The top-level pass implementation /// - /// \param[in] llvm_module - /// The module currently being processed. - /// /// \param[in] llvm_function /// The function currently being processed. /// @@ -184,12 +168,12 @@ class IRForTarget : public llvm::ModulePass { /// Find the NamedDecl corresponding to a Value. This interface is exposed /// for the IR interpreter. /// + /// \param[in] global_val + /// The global entity to search for + /// /// \param[in] module /// The module containing metadata to search /// - /// \param[in] global - /// The global entity to search for - /// /// \return /// The corresponding variable declaration public: @@ -287,7 +271,7 @@ class IRForTarget : public llvm::ModulePass { /// Replace a single old-style class reference /// - /// \param[in] selector_load + /// \param[in] class_load /// The load of the statically-allocated selector. /// /// \return @@ -362,7 +346,7 @@ class IRForTarget : public llvm::ModulePass { /// Handle all the arguments to a function call /// - /// \param[in] C + /// \param[in] call_inst /// The call instruction. /// /// \return @@ -381,8 +365,8 @@ class IRForTarget : public llvm::ModulePass { /// Remove calls to __cxa_atexit, which should never be generated by /// expressions. /// - /// \param[in] call_inst - /// The call instruction. + /// \param[in] basic_block + /// The basic block currently being processed. /// /// \return /// True if the scan was successful; false if some operation @@ -391,7 +375,7 @@ class IRForTarget : public llvm::ModulePass { /// The top-level pass implementation /// - /// \param[in] basic_block + /// \param[in] llvm_function /// The function currently being processed. /// /// \return @@ -474,28 +458,9 @@ class IRForTarget : public llvm::ModulePass { ///pointer (see comments in /// ASTResultSynthesizer::SynthesizeBodyResult) - llvm::GlobalVariable *m_reloc_placeholder; ///< A placeholder that will be - ///replaced by a pointer to the - ///final - /// location of the static allocation. - - /// UnfoldConstant operates on a constant [Old] which has just been replaced - /// with a value [New]. We assume that new_value has been properly placed - /// early in the function, in front of the first instruction in the entry - /// basic block [FirstEntryInstruction]. - /// - /// UnfoldConstant reads through the uses of Old and replaces Old in those - /// uses with New. Where those uses are constants, the function generates - /// new instructions to compute the result of the new, non-constant - /// expression and places them before FirstEntryInstruction. These - /// instructions replace the constant uses, so UnfoldConstant calls itself - /// recursively for those. - /// - /// \param[in] llvm_function - /// The function currently being processed. - /// - /// \return - /// True on success; false otherwise + /// A placeholder that will be replaced by a pointer to the final location of + /// the static allocation. + llvm::GlobalVariable *m_reloc_placeholder; class FunctionValueCache { public: @@ -513,6 +478,20 @@ class IRForTarget : public llvm::ModulePass { FunctionValueCache m_entry_instruction_finder; + /// UnfoldConstant operates on a constant [Old] which has just been replaced + /// with a value [New]. We assume that new_value has been properly placed + /// early in the function, in front of the first instruction in the entry + /// basic block [FirstEntryInstruction]. + /// + /// UnfoldConstant reads through the uses of Old and replaces Old in those + /// uses with New. Where those uses are constants, the function generates + /// new instructions to compute the result of the new, non-constant + /// expression and places them before FirstEntryInstruction. These + /// instructions replace the constant uses, so UnfoldConstant calls itself + /// recursively for those. + /// + /// \return + /// True on success; false otherwise static bool UnfoldConstant(llvm::Constant *old_constant, llvm::Function *llvm_function, FunctionValueCache &value_maker, @@ -522,9 +501,6 @@ class IRForTarget : public llvm::ModulePass { /// Commit the allocation in m_data_allocator and use its final location to /// replace m_reloc_placeholder. /// - /// \param[in] module - /// The module that m_data_allocator resides in - /// /// \return /// True on success; false otherwise bool CompleteDataAllocation(); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits