summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-09-26libm does not exist on windowsdevDan Willemsen
Mingw provides a stub library for scripts that add it, but we're not including it in our list of allowed libraries, since it's not necessary: https://android-review.googlesource.com/c/platform/build/+/494243 I'm probably going to be making it a default on darwin/linux shortly in order to match the default set of libraries on Android (similar to how -ldl / -lpthread / -lrt are defaults when available now). We can clean up uses of that later. Test: OUT_DIR=out python external/clang/build.py --no-multi-stage --no-pgo-clang --no-debug-clang Change-Id: Ia3c897270bcdf689c4dec5a28fd63f3d87eda1c6
2017-05-30[clang-tidy] Do not dereference a null BaseTypeChih-Hung Hsieh
Check BaseType before dereference. Simplified test case is derived from Android Open Source code. Differential Revision: https://reviews.llvm.org/D33430 Change-Id: I06e5c33489f48de29e7873718223c444561a940c git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@303645 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-30[clang-tidy] TwineLocalCheck: add param # checkingYan Wang
Summary: The statement **getArg** tries to get the first one without checking, which may cause segmentation fault. Reviewers: chh, bkramer Reviewed By: bkramer Subscribers: cfe-commits, xazax.hun Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D33103 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@303001 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-25Fixups after llvm rebaseYi Kong
Bug: 37423073 Test: external/clang/build.py Change-Id: I7c2db55748521c1355af37efe3d48be52be6083d
2017-04-25Merge commit '55d4858d93e8b2fbc2b5d0292eac9ac731b234ec' into r300080Yi Kong
Test: external/clang/build.py
2017-04-12[clangd] Rename ClangDMain.cpp -> ClangdMain.cpp, NFCKrasimir Georgiev
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@300077 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-11Add the definition of P in the clang tidy exampleSylvestre Ledru
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299961 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-11[clangd] Implement item kind for completion resultsKrasimir Georgiev
Summary: The patch implements the conversion method from CXCursorKind to clangd::CompletionItemKind. Contributed by stanionascu! Reviewers: cfe-commits, bkramer, krasimir Reviewed By: krasimir Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D31853 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299935 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-11Add more examples to clang tidy checkersSylvestre Ledru
Reviewers: alexfh Reviewed By: alexfh Subscribers: cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D31860 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299920 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-10[clangd] Relax absolute path checking assertionReid Kleckner
clangd can process absolute paths from systems that don't use the native path style, so this assertion needs to check both Windows and Posix path styles. Fixes PR32596 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299854 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-10Revert "XFAIL clangd tests on Windows"Reid Kleckner
This reverts r299849, apparently these tests only fail on my machine. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299850 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-10XFAIL clangd tests on WindowsReid Kleckner
They all assert. Filed as PR32596. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299849 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-10[clangd] Fix nondeterminism in clangd testKrasimir Georgiev
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299844 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-10[clangd] Remove ASTUnits for closed documents and cache CompilationDatabase ↵Krasimir Georgiev
per directory. Contributed by ilya-biryukov! Differential Revision: https://reviews.llvm.org/D31746 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299843 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-07Fix compiler warnings: "ISO c99 requires rest arguments to be used" onHaojian Wu
the test file. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299764 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-07[clangd] Extract FsPath from file:// uriKrasimir Georgiev
Patch contributed by stanionascu! rfc8089#appendix-E.2 specifies that paths can begin with a drive letter e.g. as file:///c:/. In this case just consuming front file:// is not enough and the 3rd slash must be consumed to produce a valid path on windows. The patch introduce a generic way of converting an uri to a filesystem path and back. Differential Revision: https://reviews.llvm.org/D31401 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299758 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-07[clang-tidy] A couple of minor fixes in modernize-use-using testsAlexander Kornienko
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299752 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-06[clang-tidy] Reuse FileID in getLocationChih-Hung Hsieh
One FileID per warning will increase and overflow NextLocalOffset when input file is large with many warnings. Reusing FileID avoids this problem. This requires changes in getColumnNumber, D31406, rL299681. Differential Revision: http://reviews.llvm.org/D31406 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299700 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-06[clang-tidy] Temporarily disable a test-case that does not work on windows.Gabor Horvath
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299657 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-06[clang-tidy] Update docs and help messageAlexander Kornienko
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299651 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-06[clang-tidy] Add FormatStyle configuration option.Alexander Kornienko
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299649 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-06Attempt to fix build bots after r299638.Gabor Horvath
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299645 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-06Wdocumentation fixSimon Pilgrim
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299642 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-06[clang-tidy] Check for forwarding reference overload in constructors.Gabor Horvath
Patch by András Leitereg! Differential Revision: https://reviews.llvm.org/D30547 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299638 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-05Fix -Wmissing-field-initializer warnings to unbreak the -Werror buildDavid Blaikie
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299561 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-04[clangd] Link against clangSemaJonas Devlieghere
Fixes linking issue introduced by rL299421 when building LLVM with shared libraries. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299461 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-04[clangd] Fix completion test to not depend on the standard libraryKrasimir Georgiev
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299440 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-04[clangd] Remove private vector fields from completion test.Krasimir Georgiev
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299426 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-04Fix windows buildbot error.Haojian Wu
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299422 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-04[clangd] Add code completion supportKrasimir Georgiev
Summary: Adds code completion support to clangd. Reviewers: bkramer, malaperle-ericsson Reviewed By: bkramer, malaperle-ericsson Subscribers: stanionascu, malaperle-ericsson, cfe-commits Differential Revision: https://reviews.llvm.org/D31328 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299421 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-04[clang-rename] Support renaming qualified symbolHaojian Wu
Summary: The patch adds a new feature for renaming qualified symbol references. Unlike orginal clang-rename behavior, when renaming a qualified symbol to a new qualified symbol (e.g "A::Foo" => "B::Bar"), this new rename behavior will consider the prefix qualifiers of the symbol, and calculate the new prefix qualifiers. It aims to add as few additional qualifiers as possible. As this is an early version (only supports renaming classes), I don't change current clang-rename interfaces at the moment, and would like to keep its (command-line tool) behavior. So I added new interfaces for the prototype. In the long run, these interfaces should be unified. No functionality changes in original clang-rename command-line tool. This patch also contains a few bug fixes of clang-rename which are discovered by the new unittest: * fix a potential nullptr accessment when class declaration doesn't have definition. * add USRs of nested declartaions in "getNamedDeclFor". Reviewers: ioeric Reviewed By: ioeric Subscribers: alexfh, cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D31176 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299419 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-02Fixes for modernize-use-using check:Krystyna Gajczyk
- removed unnessacary namespaces - added option to print warning in macros - no fix for typedef with array - removed "void" word from functions with 0 parameters Differential Revision: https://reviews.llvm.org/D29262 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299340 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-31[clang-tidy] Correct code-block in the doc.Haojian Wu
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299190 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-31[clang-tidy] Revert D31406 (Reuse FileID in getLocation)Chih-Hung Hsieh
Somehow the change failed test clang-tidy/llvm-include-order.cpp on Windows platform. Differential Revision: http://reviews.llvm.org/D31406 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299146 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-30[clang-tidy] Reuse FileID in getLocationChih-Hung Hsieh
One FileID per warning will increase and overflow NextLocalOffset when input file is large with many warnings. Reusing FileID avoids this problem. Differential Revision: http://reviews.llvm.org/D31406 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299119 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-30Spelling mistakes in comments. NFCI.Simon Pilgrim
Based on corrections mentioned in patch for clang for PR27635 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299074 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-30[clang-tidy] fix docs in hicpp checksJonathan Coe
Fix for sphinx-doc warnings in r299068. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299071 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-30[clang-tidy] fix for linker errors in hicpp checksJonathan Coe
Speculative fix for linker errors in r299068. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299070 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-30[clang-tidy] add aliases for hicpp moduleJonathan Coe
Summary: Add some hicpp checks that can be implmented as alises for existing clang-tidy checks: hicpp-explicit-conversions hicpp-function-size hicpp-named-parameter hicpp-invalid-access-moved hicpp-member-init hicpp-new-delete-operators hicpp-noexcept-move hicpp-special-member-functions hicpp-undelegated-constructor hicpp-use-equals-default hicpp-use-equals-delete hicpp-use-override Reviewers: dberlin, jbcoe, aaron.ballman, alexfh Reviewed By: aaron.ballman Subscribers: JDevlieghere Differential Revision: https://reviews.llvm.org/D30383 Patch By: Jonas Toth git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@299068 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-24[clangd] Add support for vscode extension configurationKrasimir Georgiev
Summary: Adds vscode workspace level configuration options for path to clangd binary and its arguments. Contributed by stanionascu! Reviewers: cfe-commits, bkramer, krasimir Reviewed By: krasimir Differential Revision: https://reviews.llvm.org/D31121 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@298696 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-23[clang-tidy] Fix treating non-space whitespaces in checks list.Marek Kurdej
Summary: This furtherly improves r295303: [clang-tidy] Ignore spaces between globs in the Checks option. Trims all whitespaces and not only spaces and correctly computes the offset of the checks list (taking the size before trimming). Reviewers: alexfh Reviewed By: alexfh Subscribers: cfe-commits, JDevlieghere Differential Revision: https://reviews.llvm.org/D30567 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@298621 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-23[clang-tidy] Don't use groups in the big regexy filterAlexander Kornienko
Fixes https://bugs.llvm.org/show_bug.cgi?id=27641. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@298619 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-23[clang-tidy] Fix diag message for catch-by-valueAlexander Kornienko
Summary: ``` catch (std::exception ex) { } ``` Was flagged with "catch handler catches a pointer value". Reviewers: alexfh, aaron.ballman Reviewed By: aaron.ballman Subscribers: cfe-commits, JDevlieghere Patch by Florian Gross! Differential Revision: https://reviews.llvm.org/D30592 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@298608 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-23[clang-tidy] Catch trivially true statements like a != 1 || a != 3Alexander Kornienko
Catch trivially true statements of the form a != 1 || a != 3. Statements like these are likely errors. They are particularly easy to miss when handling enums: enum State { RUNNING, STOPPED, STARTING, ENDING } ... if (state != RUNNING || state != STARTING) ... Patch by Blaise Watson! Differential revision: https://reviews.llvm.org/D29858 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@298607 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-22[clang-tidy] Tests should not rely on STL headers being available.Alexander Kornienko
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@298501 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-22[clang-tidy] clang-format the last patch. NFCAlexander Kornienko
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@298500 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-22[clang-tidy] modified identifier naming case to use CT_AnyCase for ignoring ↵Alexander Kornienko
case style Summary: Using CaseType::CT_AnyCase for selected identifier results in inheriting case style setting from more basic identifier type. This patch changes CT_AnyCase behavior to ignore case style of specified identifier. If case style was not set, llvm::Optional will be used for keeping this information (llvm::Optional<>::hasVal), thus CT_AnyCase will no longer mean more general identifier style should be used. This eliminates false-positives when naming convention is not clear for specific areas of code (legacy, third party) or for selected types. Reviewers: berenm, alexfh Reviewed By: alexfh Subscribers: cfe-commits, JDevlieghere Differential Revision: https://reviews.llvm.org/D30931 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@298499 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-22Reverting r298421 due to using a header that's unavailable to all systems ↵Aaron Ballman
and some other post-commit review feedback. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@298470 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-21Apply clang-tidy's performance-unnecessary-value-param to clang-tidy.Benjamin Kramer
No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@298442 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-21Don't make unqualified calls to functions that could well be found viaChandler Carruth
ADL as reasonable extension points. All of this would be cleaner if this code followed the more usual LLVM convention of not having deeply nested namespaces inside of .cpp files and instead having a `using namespace ...;` at the top. Then the static function would be in the global namespace and easily referred to as `::join`. Instead we have to write a fairly contrived qualified name. I figure the authors can clean this up with a less ambiguous name, using the newly provided LLVM `join` function, or any other solution, but this at least fixes the build. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@298434 91177308-0d34-0410-b5e6-96231b3b80d8