summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [clang-tidy] Improve string type matcher for abseil-string-find-starts-with ↵Haojian Wu2018-06-081-2/+17
| | | | | | | | | | | | | | | | check. Summary: This patch improves the check to match the desugared "string" type (so that it can handle custom-implemented string classes), see the newly-added test. Reviewers: alexfh Subscribers: klimek, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D47704 llvm-svn: 334270
* [clangd] Code completion: drop explicit injected names/operators, ignore ↵Sam McCall2018-06-072-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sema priority Summary: Now we have most of Sema's code completion signals incorporated in Quality, which will allow us to give consistent ranking to sema/index results. Therefore we can/should stop using Sema priority as an explicit signal. This fixes some issues like namespaces always having a terrible score. The most important missing signals are: - Really dumb/rarely useful completions like: SomeStruct().^SomeStruct SomeStruct().^operator= SomeStruct().~SomeStruct() We already filter out destructors, this patch adds injected names and operators to that list. - type matching the expression context. Ilya has a plan to add this in a way that's compatible with indexes (design doc should be shared real soon now!) Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D47871 llvm-svn: 334192
* [clang-doc] Implement a YAML generatorJulie Hockett2018-06-063-0/+481
| | | | | | | | | Implmenting a YAML generator from the emitted bitcode summary of declarations. Emits one YAML file for each declaration information. For a more detailed overview of the tool, see the design document on the mailing list: http://lists.llvm.org/pipermail/cfe-dev/2017-December/056203.html llvm-svn: 334103
* [clang-tidy] Store checks profiling info as JSON filesRoman Lebedev2018-06-063-8/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Continuation of D46504. Example output: ``` $ clang-tidy -enable-check-profile -store-check-profile=. -checks=-*,readability-function-size source.cpp $ # Note that there won't be timings table printed to the console. $ cat *.json { "file": "/path/to/source.cpp", "timestamp": "2018-05-16 16:13:18.717446360", "profile": { "time.clang-tidy.readability-function-size.wall": 1.0421266555786133e+00, "time.clang-tidy.readability-function-size.user": 9.2088400000005421e-01, "time.clang-tidy.readability-function-size.sys": 1.2418899999999974e-01 } } ``` There are two arguments that control profile storage: * `-store-check-profile=<prefix>` By default reports are printed in tabulated format to stderr. When this option is passed, these per-TU profiles are instead stored as JSON. If the prefix is not an absolute path, it is considered to be relative to the directory from where you have run :program:`clang-tidy`. All `.` and `..` patterns in the path are collapsed, and symlinks are resolved. Example: Let's suppose you have a source file named `example.cpp`, located in `/source` directory. * If you specify `-store-check-profile=/tmp`, then the profile will be saved to `/tmp/<timestamp>-example.cpp.json` * If you run :program:`clang-tidy` from within `/foo` directory, and specify `-store-check-profile=.`, then the profile will still be saved to `/foo/<timestamp>-example.cpp.json` Reviewers: alexfh, sbenza, george.karpenkov, NoQ, aaron.ballman Reviewed By: alexfh, george.karpenkov, aaron.ballman Subscribers: Quuxplusone, JonasToth, aaron.ballman, llvm-commits, rja, Eugene.Zelenko, xazax.hun, mgrang, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D46602 llvm-svn: 334101
* [clang-tidy] fix broken test (no compile command) from r331763Sam McCall2018-06-052-2/+2
| | | | llvm-svn: 333994
* [clangd] Rewrite JSON dispatcher loop using C IO (FILE*) instead of ↵Sam McCall2018-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | std::istream. Summary: The EINTR loop around getline was added to fix an issue with mac gdb, but seems to loop infinitely in rare cases on linux where the parent editor exits (most reports with VSCode). I can't work out how to fix this in a portable way with std::istream, but the C APIs have clearer contracts and LLVM has a RetryAfterSignal function for use with them which seems battle-tested. While here, clean up some inconsistency around \n in log messages (now add it only after JSON payloads), and reduce the scope of the long-message handling which was only really added to fight fuzzers. Reviewers: malaperle, ilya-biryukov Subscribers: klimek, ioeric, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D47643 llvm-svn: 333993
* [clang-doc] Implement reducer portion of the frontend frameworkJulie Hockett2018-06-043-0/+560
| | | | | | | | | | | | | | | | | | Implements a simple, in-memory reducer for the mapped output of the initial tool. This creates a collection object for storing the deduplicated infos on each declaration, and populates that from the mapper output. The collection object is serialized to LLVM bitstream. On reading each serialized output, it checks to see if a merge is necessary and if so, merges the new info with the existing info (prefering the existing one if conflicts exist). For a more detailed overview of the tool, see the design document on the mailing list: http://lists.llvm.org/pipermail/cfe-dev/2017-December/056203.html Differential Revision: https://reviews.llvm.org/D43341 llvm-svn: 333932
* [clangd] Hover should return null when not hovering over anything.Sam McCall2018-06-041-0/+5
| | | | | | | | | | | | Summary: Also made JSON serialize Optional<T> to simplify this. Reviewers: ioeric Subscribers: klimek, ilya-biryukov, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D47701 llvm-svn: 333881
* [clangd] Keep only a limited number of idle ASTs in memoryIlya Biryukov2018-06-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Summary: After this commit, clangd will only keep the last 3 accessed ASTs in memory. Preambles for each of the opened files are still kept in memory to make completion and AST rebuilds fast. AST rebuilds are usually fast enough, but having the last ASTs in memory still considerably improves latency of operations like findDefinition and documeneHighlight, which are often sent multiple times a second when moving around the code. So keeping some of the last accessed ASTs in memory seems like a reasonable tradeoff. Reviewers: sammccall Reviewed By: sammccall Subscribers: malaperle, arphaman, klimek, javed.absar, ioeric, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D47063 llvm-svn: 333737
* [Driver] Clean up tmp files when deleting Compilation objectsDavid Stenberg2018-05-311-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In rL327851 the createUniqueFile() and createTemporaryFile() variants that do not return the file descriptors were changed to create empty files, rather than only check if the paths are free. This change was done in order to make the functions race-free. That change led to clang-tidy (and possibly other tools) leaving behind temporary assembly files, of the form placeholder-*, when using a target that does not support the internal assembler. The temporary files are created when building the Compilation object in stripPositionalArgs(), as a part of creating the compilation database for the arguments after the double-dash. The files are created by Driver::GetNamedOutputPath(). Fix this issue by cleaning out temporary files at the deletion of Compilation objects. This fixes https://bugs.llvm.org/show_bug.cgi?id=37091. Reviewers: klimek, sepavloff, arphaman, aaron.ballman, john.brawn, mehdi_amini, sammccall, bkramer, alexfh, JDevlieghere Reviewed By: aaron.ballman, JDevlieghere Subscribers: erichkeane, lebedev.ri, Ka-Ka, cfe-commits Differential Revision: https://reviews.llvm.org/D45686 llvm-svn: 333637
* [clang-tidy] new cppcoreguidelines-narrowing-conversions check.Clement Courbet2018-05-231-0/+103
| | | | | | | | | | | | | | | | | | | Summary: Checks for narrowing conversions, e.g. int i = 0; i += 0.1; This has what some might consider false positives for: i += ceil(d); Reviewers: alexfh, hokein Subscribers: srhines, nemanjai, mgorny, JDevlieghere, xazax.hun, kbarton Differential Revision: https://reviews.llvm.org/D38455 llvm-svn: 333066
* [clang-tidy] SimplifyBoolenExpr doesn't add parens if unary negotiation is ↵Zinovy Nis2018-05-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | of ExprWithCleanups type bool foo(A &S) { if (S != (A)S) return false; return true; } is fixed into (w/o this patch) ... return !S != (A)S; // negotiation affects first operand only } instead of (with this patch) ... return S == (A)S; // note == instead of != } Differential Revision: https://reviews.llvm.org/D47122 llvm-svn: 333003
* Re-enable a clang-move test on windows.Eric Liu2018-05-181-4/+0
| | | | | | This was fixed by r332612. llvm-svn: 332701
* Disable a failing clang-move test on windows.Eric Liu2018-05-171-0/+4
| | | | | | | | | | | This was broken by r332590 but is likely caused by a bug in clang-move. http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/12007 I don't have a windows machine to effectively debug the issue, so I'll investigate further but for now disable the failing test on windows to unbreak build bots. llvm-svn: 332620
* [clang-tidy] Add a flag to enable alpha checkersAlexander Kornienko2018-05-171-0/+6
| | | | | | | | | | | | | | | | Summary: The alpha checkers can already be enabled using the clang driver, this allows them to be enabled using the clang-tidy as well. This can make it easier to test the alpha checkers with projects which already support the compile_commands.json. It will also allow more people to give feedback and patches about the alpha checkers since they can run it as part of clang tidy checks. Reviewers: aaron.ballman, hokein, ilya-biryukov, alexfh, lebedev.ri, xbolva00 Reviewed By: aaron.ballman, alexfh, lebedev.ri, xbolva00 Subscribers: xbolva00, NoQ, dcoughlin, lebedev.ri, xazax.hun, cfe-commits Patch by Paul Fultz II! Differential Revision: https://reviews.llvm.org/D46159 llvm-svn: 332609
* Add a new check, readability-simplify-subscript-expr, that diagnoses array ↵Aaron Ballman2018-05-161-0/+108
| | | | | | | | | | subscript expressions that can be simplified. Currently, diagnoses code that calls container.data()[some_index] when the container exposes a suitable operator[]() method that can be used directly. Patch by Shuai Wang. llvm-svn: 332519
* [clang-tidy/google-readability-casting] Disable check for Objective-C++Ben Hamilton2018-05-161-0/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, `google-readability-casting` was disabled for Objective-C. The Google Objective-C++ style allows both Objective-C and C++ style in the same file. Since clang-tidy doesn't have a good way to allow multiple styles per file, this disables the check for Objective-C++. Test Plan: New tests added. Ran tests with: % make -j16 check-clang-tools Before diff, confirmed tests failed: https://reviews.llvm.org/P8081 After diff, confirrmed tests passed. Reviewers: alexfh, Wizard, hokein, stephanemoore Reviewed By: alexfh, Wizard, stephanemoore Subscribers: stephanemoore, cfe-commits, bkramer, klimek Differential Revision: https://reviews.llvm.org/D46659 llvm-svn: 332516
* [clangd] Remove LSP command-based #include insertion.Eric Liu2018-05-153-40/+2
| | | | | | | | | | | | | | | | | Summary: clangd will populate #include insertions as addtionalEdits in completion items. The code completion tests in ClangdServerTest will be added back in D46497. Reviewers: ilya-biryukov, sammccall Reviewed By: ilya-biryukov Subscribers: klimek, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D46676 llvm-svn: 332362
* [clang-tidy] Add terminating continue checkGabor Horvath2018-05-141-0/+65
| | | | | | | | Patch by: Daniel Kolozsvari! Differential Revision: https://reviews.llvm.org/D33844 llvm-svn: 332223
* [clang-tidy] Fixing fuchsia-restrict-includes-headers testJulie Hockett2018-05-111-3/+3
| | | | | | Removing filepaths so windows tests pass. llvm-svn: 332152
* [clang-tidy] Cleaning up test output (fuchsia-restrict-system-includes)Julie Hockett2018-05-111-8/+9
| | | | | | | This should fix the break in the fuchsia-restrict-system-includes-headers test. llvm-svn: 332143
* Reland "[clang-tidy] Adding RestrictSystemIncludes check to Fuchsia module"Julie Hockett2018-05-1113-0/+72
| | | | | | This relands r332125 with a fixed test. llvm-svn: 332141
* Revert "[clang-tidy] Adding RestrictSystemIncludes check to Fuchsia module"Julie Hockett2018-05-1113-70/+0
| | | | | | This reverts commit r332125 for a failing test. llvm-svn: 332131
* [clang-tidy] Adding RestrictSystemIncludes check to Fuchsia moduleJulie Hockett2018-05-1113-0/+70
| | | | | | | | | | Adding a check to restrict system includes to a whitelist. Given a list of includes that are explicitly allowed, the check issues a fixit to remove any system include not on that list from the source file. Differential Revision: https://reviews.llvm.org/D43778 llvm-svn: 332125
* Revert "[clang-tidy] Adding RestrictSystemIncludes check to Fuchsia module"Julie Hockett2018-05-099-51/+0
| | | | | | This reverts commit r331930, which was landed by accident. llvm-svn: 331934
* [clang-tidy] Adding RestrictSystemIncludes check to Fuchsia moduleJulie Hockett2018-05-099-0/+51
| | | | | | | | | | Adding a check to restrict system includes to a whitelist. Given a list of includes that are explicitly allowed, the check issues a fixit to remove any system include not on that list from the source file. Differential Revision: https://reviews.llvm.org/D43778 llvm-svn: 331930
* Do not warn on unused parameters for functions with empty bodies.Manuel Klimek2018-05-092-48/+51
| | | | | | If a function has an empty body, all parameters are trivially unused. llvm-svn: 331875
* [clang-tidy] Profile is a per-AST (per-TU) data.Roman Lebedev2018-05-082-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: As discussed in D45931, currently, profiling output of clang-tidy is somewhat not great. It outputs one profile at the end of the execution, and that profile contains the data from the last TU that was processed. So if the tool run on multiple TU's, the data is not accumulated, it is simply discarded. It would be nice to improve this. This differential is the first step - make this profiling info per-TU, and output it after the tool has finished processing each TU. In particular, when `ClangTidyASTConsumer` destructor runs. Next step will be to add a CSV (JSON?) printer to store said profiles under user-specified directory prefix. Reviewers: alexfh, sbenza Reviewed By: alexfh Subscribers: Eugene.Zelenko, mgorny, xazax.hun, mgrang, klimek, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D46504 llvm-svn: 331763
* Add support for ObjC property name to be a single acronym.Yan Zhang2018-05-042-0/+2
| | | | | | | | | | | | | | | | | | | | | Summary: This change will support cases like: ``` @property(assign, nonatomic) int ID; ``` Reviewers: benhamilton, hokein Reviewed By: benhamilton Subscribers: klimek, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D46374 llvm-svn: 331545
* [clang-doc] Attaching a name to reference dataJulie Hockett2018-05-0410-75/+125
| | | | | | | | | | This adds the name of the referenced decl, in addition to its USR, to the saved data, so that the backend can look at an info in isolation and still be able to construct a human-readable name for it. Differential Revision: https://reviews.llvm.org/D46281 llvm-svn: 331539
* Simplify test clang-tidy-__clang_analyzer__macro.cpp Zinovy Nis2018-05-031-5/+0
| | | | llvm-svn: 331475
* [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for ↵Zinovy Nis2018-05-031-0/+10
| | | | | | | | | | | | | compatibility with clang static analyzer This macro is widely used in many well-known projects, ex. Chromium. But it's not set for clang-tidy, so for ex. DCHECK in Chromium is not considered as [[no-return]], and a lot of false-positive warnings about nullptr dereferenced are emitted. Differential Revision: https://reviews.llvm.org/D46325 llvm-svn: 331474
* [clang-tidy] Remove AnalyzeTemporaryDtors option.Alexander Kornienko2018-05-031-2/+3
| | | | | | | | Remove the `AnalyzeTemporaryDtors` option, since the corresponding `cfg-temporary-dtors` option of the Static Analyzer defaults to `true` since r326461. llvm-svn: 331456
* [clang-tidy][modernize-raw-string-literal] Don't replace upper ASCII with ↵Zinovy Nis2018-05-011-0/+2
| | | | | | | | | | raw literals It's useless and not safe to replace UTF-8 encoded with escaped ASCII to raw UTF-8 chars: "\xE2\x98\x83" ---> <snowman> So don't do it. llvm-svn: 331297
* [clang-tidy/google-runtime-int] Allow passing non-bitwidth types to ↵Ben Hamilton2018-05-011-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | printf()-style APIs Summary: The `google-runtime-int` check currently fires on calls like: printf("%lu", (unsigned long)foo); However, the style guide says: > Where possible, avoid passing arguments of types specified by > bitwidth typedefs to printf-based APIs. http://google.github.io/styleguide/cppguide.html#64-bit_Portability This diff relaxes the check to not fire on parameters to functions with the `__format__` attribute. (I didn't specifically check for `__printf__` since there are a few variations.) Test Plan: New tests added. Ran tests with: % make -j16 check-clang-tools Reviewers: alexfh, bkramer Reviewed By: alexfh Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D46293 llvm-svn: 331268
* [clang-tidy] Add Apple prefix acronyms to objc-property-declarationBen Hamilton2018-05-011-0/+2
| | | | | | | | | | | | | | | | | | | | | Summary: This adds a few common Apple first-party API prefixes as acronyms to `objc-property-declaration`. Here's a list showing where these come from: http://nshipster.com/namespacing/ Test Plan: New tests added. Ran tests with: % make -j16 check-clang-tools Reviewers: Wizard, hokein Subscribers: klimek, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D46206 llvm-svn: 331267
* [clangd] Fix unicode handling, using UTF-16 where LSP requires it.Sam McCall2018-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The Language Server Protocol unfortunately mandates that locations in files be represented by line/column pairs, where the "column" is actually an index into the UTF-16-encoded text of the line. (This is because VSCode is written in JavaScript, which is UTF-16-native). Internally clangd treats source files at UTF-8, the One True Encoding, and generally deals with byte offsets (though there are exceptions). Before this patch, conversions between offsets and LSP Position pretended that Position.character was UTF-8 bytes, which is only true for ASCII lines. Now we examine the text to convert correctly (but don't actually need to transcode it, due to some nice details of the encodings). The updated functions in SourceCode are the blessed way to interact with the Position.character field, and anything else is likely to be wrong. So I also updated the other accesses: - CodeComplete needs a "clang-style" line/column, with column in utf-8 bytes. This is now converted via Position -> offset -> clang line/column (a new function is added to SourceCode.h for the second conversion). - getBeginningOfIdentifier skipped backwards in UTF-16 space, which is will behave badly when it splits a surrogate pair. Skipping backwards in UTF-8 coordinates gives the lexer a fighting chance of getting this right. While here, I clarified(?) the logic comments, fixed a bug with identifiers containing digits, simplified the signature slightly and added a test. This seems likely to cause problems with editors that have the same bug, and treat the protocol as if columns are UTF-8 bytes. But we can find and fix those. Reviewers: hokein Subscribers: klimek, ilya-biryukov, ioeric, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D46035 llvm-svn: 331029
* [clang-tidy] Improve bugprone-unused-return-value checkJonathan Coe2018-04-242-3/+70
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add support for checking class template member functions. Also add the following functions to be checked by default: - std::unique_ptr::release - std::basic_string::empty - std::vector::empty Reviewers: alexfh, hokein, aaron.ballman, ilya-biryukov Reviewed By: aaron.ballman Subscribers: jbcoe, xazax.hun, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D45891 Patch by khuttun (Kalle Huttunen) llvm-svn: 330772
* [clangd] Commit a heinous crime to make test hermetic and not depend on the ↵Benjamin Kramer2018-04-242-3/+6
| | | | | | standard library being around. llvm-svn: 330754
* [clang-tidy] Fix PR35468Gabor Horvath2018-04-241-0/+12
| | | | | | Differential Revision: https://reviews.llvm.org/D46003 llvm-svn: 330719
* [clangd] Implementation of workspace/symbol requestMarc-Andre Laperle2018-04-233-2/+37
| | | | | | | | | | | | | | | | | | | | | | | Summary: This is a basic implementation of the "workspace/symbol" request which is used to find symbols by a string query. Since this is similar to code completion in terms of result, this implementation reuses the "fuzzyFind" in order to get matches. For now, the scoring algorithm is the same as code completion and improvements could be done in the future. The index model doesn't contain quite enough symbols for this to cover common symbols like methods, enum class enumerators, functions in unamed namespaces, etc. The index model will be augmented separately to achieve this. Reviewers: sammccall, ilya-biryukov Reviewed By: sammccall Subscribers: jkorous, hokein, simark, sammccall, klimek, mgorny, ilya-biryukov, mgrang, jkorous-apple, ioeric, MaskRay, cfe-commits Differential Revision: https://reviews.llvm.org/D44882 llvm-svn: 330637
* [clangd][tests] Fix delimiter handlingJan Korous2018-04-231-0/+13
| | | | | | | | Empty line shouldn't be considered a delimiter Differential Revision: https://reviews.llvm.org/D45764 llvm-svn: 330609
* [clangd][tests] Fix handling of EOF in delimited inputJan Korous2018-04-231-0/+12
| | | | | | | | Request in delimited input ended by EOF shouldn't be an error state. Comments at the end of test file shouldn't be logged as an error state. Input mirroring should work for the last request in delimited test file. llvm-svn: 330608
* Fix tests after changes to clang-format in r330573.Manuel Klimek2018-04-231-11/+11
| | | | | | | | | | We do now both: - stop reformatting a sequence after a closing brace in more cases, in order to not misindent after an incorrect closing brace - format the closing brace when formatting the line containing the opening brace llvm-svn: 330580
* update readability-identifier-naming-objc test to use interface ivar. ↵Yan Zhang2018-04-231-5/+2
| | | | | | | | | | | | Implementation ivars are not supported in 32-bits OS. Reviewers: alexfh, chandlerc Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D45936 llvm-svn: 330562
* update test to use ivar in implementation instead of class extensionYan Zhang2018-04-231-0/+15
| | | | | | | | | | | | | | Summary: using ivar in class extension is not supported in 32-bit architecture of MacOS. Reviewers: alexfh, hokein Reviewed By: alexfh Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D45912 llvm-svn: 330559
* Revert r330492: [clang-tidy] add new check to find out objc ivars which do ↵Chandler Carruth2018-04-211-15/+0
| | | | | | | | | | not have prefix '_' This commit has been breaking most bots for a day now. There is a fix proposed in https://reviews.llvm.org/D45912 but when I applied that I just got different errors. Reverting to get our bots back to green. llvm-svn: 330528
* [clang-tidy] Customize FileCheck prefix in check_clang-tidy.pyZinovy Nis2018-04-212-8/+38
| | | | | | | | | | | | | | | | | | | The patch introduces a new command line option '-check-suffix' for check_clang_tidy.py to allow multiple %check_clang_tidy% in a single test file. Sample: // RUN: %check_clang_tidy -check-suffix=FLAG-1 %s misc-unused-using-decls %t -- -- <options-set-1> // RUN: %check_clang_tidy -check-suffix=FLAG-2 %s misc-unused-using-decls %t -- -- <options-set-2> ... +// CHECK-MESSAGES-FLAG-1: :[[@LINE-4]]:10: warning: using decl 'B' is unused [misc-unused-using-decls] +// CHECK-MESSAGES-FLAG-2: :[[@LINE-7]]:10: warning: using decl 'A' is unused [misc-unused-using-decls] +// CHECK-FIXES-FLAG-1-NOT: using a::A;$ +// CHECK-FIXES-FLAG-2-NOT: using a::B;$ Differential Revision: https://reviews.llvm.org/D45776 llvm-svn: 330511
* [clang-tidy] add new check to find out objc ivars which do not have prefix '_'Yan Zhang2018-04-201-0/+15
| | | | | | | | | | | | | | | | | | | | | | | Summary: For code of ivar declaration: int barWithoutPrefix; The fix will be: int _barWithoutPrefix; Reviewers: benhamilton, hokein, alexfh, aaron.ballman, ilya-biryukov Reviewed By: alexfh Subscribers: Eugene.Zelenko, xazax.hun, klimek, mgorny, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D45392 llvm-svn: 330492
* Fix test from r330245 on Windows.Douglas Yung2018-04-181-1/+1
| | | | llvm-svn: 330305
OpenPOWER on IntegriCloud