;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (require 'dom) #@41 Position point just after HTTP headers. (defalias 'lsp-cpp-flycheck-clang-tidy--skip-http-headers #[0 "\300\301!\207" [re-search-forward "^$"] 2 (#$ . 102)]) #@68 Narrow the current buffer to contain the body of an HTTP response. (defalias 'lsp-cpp-flycheck-clang-tidy--narrow-to-http-body #[0 "\300 \210`d}\207" [lsp-cpp-flycheck-clang-tidy--skip-http-headers] 2 (#$ . 266)]) #@61 Decode a region from START to END in UTF-8. (fn START END) (defalias 'lsp-cpp-flycheck-clang-tidy--decode-region-as-utf8 #[514 "\3001 \301\302#0\207\210\303\207" [(coding-system-error) decode-coding-region utf-8 nil] 6 (#$ . 486)]) #@64 Remove carriage return and line feeds from the current buffer. (defalias 'lsp-cpp-flycheck-clang-tidy--remove-crlf #[0 "\212\300\301\302\303#\205\304\305\303\211#\210\202)\207" [re-search-forward " $" nil t replace-match ""] 4 (#$ . 728)]) #@319 Extract the parts of the LLVM clang-tidy documentation that are relevant. This function assumes that the current buffer contains the result of browsing 'clang.llvm.org', as returned by `url-retrieve'. More concretely, this function returns the main
element with class 'section', and also removes 'headerlinks'. (defalias 'lsp-cpp-flycheck-clang-tidy--extract-relevant-doc-section #[0 "eb\210\300 \210\301ed\"\210\302 \210\303ed\"\304\305\"\304\306\"\211\203,\211@\307\"\210A\266\202\202\210\207" [lsp-cpp-flycheck-clang-tidy--narrow-to-http-body lsp-cpp-flycheck-clang-tidy--decode-region-as-utf8 lsp-cpp-flycheck-clang-tidy--remove-crlf libxml-parse-html-region dom-by-class "section" "headerlink" dom-remove-node] 7 (#$ . 979)]) #@231 Explain an error in the Flycheck error explanation buffer using EXPLANATION. EXPLANATION is a function with optional ARGS that, when evaluated, inserts the content in the appropriate Flycheck buffer. (fn EXPLANATION &rest ARGS) (defalias 'lsp-cpp-flycheck-clang-tidy--explain-error #[385 "rq\210\303\211\304 \210\305\"\210eb+\207" [flycheck-explain-error-buffer inhibit-modification-hooks inhibit-read-only t erase-buffer apply] 5 (#$ . 1732)]) #@428 Show a loading string while clang-tidy documentation is fetched from llvm.org. Recent versions of `flycheck' call `display-message-or-buffer' to display error explanations. `display-message-or-buffer' displays the documentation string either in the echo area or in a separate window, depending on the string's height. This function forces to always display it in a separate window by appending the required number of newlines. (defalias 'lsp-cpp-flycheck-clang-tidy--show-loading-status #[0 "\302\203\303 !\203\304 _\202 \250\203 \202 \305\202 \305!\306\307\"\310P\207" [resize-mini-windows max-mini-window-height round floatp frame-height 1 make-string 10 "Loading documentation..."] 4 (#$ . 2191)]) #@114 Show clang-tidy documentation about ERROR-ID. Information comes from the clang.llvm.org website. (fn ERROR-ID) (defalias 'lsp-cpp-flycheck-clang-tidy--show-documentation #[257 "\300\301\302\"\303\"\210\304 \207" [url-retrieve format "https://clang.llvm.org/extra/clang-tidy/checks/%s.html" #[257 "\300\301\"\211\203\302\303\304\305\306!\"\"\207\307 \302\310\"\207" [plist-get :error lsp-cpp-flycheck-clang-tidy--explain-error insert format "Error accessing clang-tidy documentation: %s" error-message-string lsp-cpp-flycheck-clang-tidy--extract-relevant-doc-section shr-insert-document] 8 "\n\n(fn STATUS)"] lsp-cpp-flycheck-clang-tidy--show-loading-status] 5 (#$ . 2913)]) #@81 Explain a clang-tidy ERROR by scraping documentation from llvm.org. (fn ERROR) (defalias 'lsp-cpp-flycheck-clang-tidy-error-explainer #[257 "\300\301!\204\n\302\303!\210\304!\211\203!\3051\306!0\207\307\310\311!\"\207\302\312!\207" [fboundp libxml-parse-html-region error "This function requires Emacs to be compiled with libxml2" flycheck-error-id (error) lsp-cpp-flycheck-clang-tidy--show-documentation format "Error accessing clang-tidy documentation: %s" error-message-string "The clang-tidy error message does not contain an [error-id]"] 7 (#$ . 3601)]) (provide 'lsp-cpp)