summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/misc
Commit message (Collapse)AuthorAgeFilesLines
...
* [clang-tidy] Lift parsing of sequence of names functions to utils.Etienne Bergeron2016-05-102-34/+11
| | | | | | | | | | | | | | | | Summary: Lift some common code used by multiple checkers. This function is also used by checkers that are coming. It is quite common for a checker to parse a list of names. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19846 llvm-svn: 269065
* Support variables and functions types in misc-unused-using-decls.Haojian Wu2016-05-092-5/+29
| | | | | | | | | | | | Summary: Fix PR27429. Reviewers: djasper Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D20018 llvm-svn: 268917
* Trying to fix docs.Alexander Kornienko2016-05-092-2/+2
| | | | llvm-svn: 268905
* [clang-tidy] New: checker misc-unconventional-assign-operator replacing ↵Gabor Horvath2016-05-044-26/+40
| | | | | | | | | | | | | | misc-assign-operator-signature Summary: Finds return statements in assign operator bodies where the return value is different from '*this'. Only assignment operators with correct return value Class& are checked. Reviewers: aaron.ballman, alexfh, sbenza Subscribers: o.gyorgy, baloghadamsoftware, LegalizeAdulthood, aaron.ballman, Eugene.Zelenko, xazax.hun, cfe-commits Differential Revision: http://reviews.llvm.org/D18265 llvm-svn: 268492
* [clang-tidy] MoveConstructorInitCheck - Add parameter name to check message.Felix Berger2016-05-031-2/+3
| | | | | | | | | | Reviewers: alexfh Subscribers: aaron.ballman, cfe-commits Differential Revision: http://reviews.llvm.org/D19849 llvm-svn: 268461
* [clang-tidy] Speedup misc-static-assert.Samuel Benzaquen2016-05-031-3/+7
| | | | | | | | | | | | | | | | | | | Summary: Speedup the misc-static-assert check by not use `stmt()` as the toplevel matcher. The framework runs a filter on the matchers before trying them on each node and uses the toplevel type for this. Using `stmt()` as the toplevel causes the matcher to be run on every `Stmt` node, even if the node doesn't match the desired types. This change speeds up clang-tidy by ~5% in a benchmark. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19877 llvm-svn: 268430
* [clang-tidy] Cleanup namespace in utils folder.Etienne Bergeron2016-05-033-7/+8
| | | | | | | | | | | | | | Summary: This is a step forward cleaning up the namespaces in clang-tidy/utils. There is no behavior change. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19819 llvm-svn: 268356
* [clang-tidy] Cleaning namespaces to be more consistant across checkers.Etienne Bergeron2016-05-0228-27/+72
| | | | | | | | | | | | | | Summary: The goal of the patch is to bring checkers in their appropriate namespace. This path doesn't change any behavior. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19811 llvm-svn: 268264
* [clang-tidy] Now adding correct misc-move-const-arg documentation ;]Alexander Kornienko2016-04-261-10/+9
| | | | | | + brushed the code a bit and renamed the test file to match the check name llvm-svn: 267592
* [clang-tidy] New checker for redundant expressions.Etienne Bergeron2016-04-264-0/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This checker finds redundant expression on both side of a binary operator. The current implementation provide a function to check whether expressions are equivalent. This implementation is able to recognize the common subset encounter in C++ program. Side-effects like "x++" are not considered to be equivalent. There are many False Positives related to macros and to floating point computations (detecting NaN). The checker is ignoring these cases. Example: ``` if( !dst || dst->depth != desired_depth || dst->nChannels != desired_num_channels || dst_size.width != src_size.width || dst_size.height != dst_size.height ) <<--- bug { ``` Reviewers: alexfh Subscribers: danielmarjamaki, fahlgren, jordan_rose, zaks.anna, Eugene.Zelenko, cfe-commits Differential Revision: http://reviews.llvm.org/D19451 llvm-svn: 267574
* [clang-tidy] Enhance misc-suspicious-string-compare to move down ↵Etienne Bergeron2016-04-261-36/+42
| | | | | | | | | | | | | | | | | | | | | | false-positives. Summary: The checker was noisy when running over llvm code base. This patch is impriving the way string-compare functions are matched. 1) By default, do not report !strcmp(...) unless it's activate by the user, 2) Only match suspicious expression over a subset of expression (binary operator), 3) Added matching of macro wrapper used with clang on linux. See bug: 27465. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19497 llvm-svn: 267570
* A clang-tidy check for std:accumulate.Alexander Kornienko2016-04-264-0/+188
| | | | | | | | | | | | | | | | | Summary: For folds (e.g. std::accumulate), check matches between the provided init value and the range's value_type. A typical error is "std::accumulate(begin, end, 0);", where begin and end have float value_type. See the documentation for more examples. For now we check std::accumulate, std::reduce and std::inner_product. Reviewers: hokein, alexfh Subscribers: Prazek, aaron.ballman, cfe-commits, courbet Patch by Clément Courbet! Differential Revision: http://reviews.llvm.org/D18442 llvm-svn: 267542
* [clang-tidy] Fix misc-macro-repeated-side-effects false positive with ↵Alexander Kornienko2016-04-231-0/+11
| | | | | | stringified arguments llvm-svn: 267254
* [Clang-tidy] Fix Clang warning in misc/StringConstructorCheck.h.Eugene Zelenko2016-04-221-1/+1
| | | | | | Using LLVM_ENABLE_WARNINGS=ON is good idea. llvm-svn: 267228
* [clang-tidy] Fix broken build bot.Etienne Bergeron2016-04-211-44/+44
| | | | | | | | | | | | | | | | | | | | | Summary: There is a build bot that doesn't support 'constexpr'. ``` FAILED: C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\cl.exe /nologo /TP /DWIN32 /D_WINDOWS /W4 -wd4141 -wd4146 -wd4180 -wd4244 -wd4258 -wd4267 -wd4291 -wd4345 -wd4351 -wd4355 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4800 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4324 -w14062 -we4238 /Zc:inline /Oi /Zc:rvalueCast /MD /O2 /Ob2 -Itools\clang\tools\extra\clang-tidy\misc -ID:\buildslave\clang-x64-ninja-win7\llvm\tools\clang\tools\extra\clang-tidy\misc -ID:\buildslave\clang-x64-ninja-win7\llvm\tools\clang\include -Itools\clang\include -Iinclude -ID:\buildslave\clang-x64-ninja-win7\llvm\include -UNDEBUG /EHs-c- /GR- /showIncludes -DCLANG_ENABLE_ARCMT -DCLANG_ENABLE_OBJC_REWRITER -DCLANG_ENABLE_STATIC_ANALYZER -DGTEST_HAS_RTTI=0 -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_DEBUG_POINTER_IMPL="" -D_GNU_SOURCE -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS /Fotools\clang\tools\extra\clang-tidy\misc\CMakeFiles\clangTidyMiscModule.dir\SuspiciousStringCompareCheck.cpp.obj /Fdtools\clang\tools\extra\clang-tidy\misc\CMakeFiles\clangTidyMiscModule.dir\ /FS -c D:\buildslave\clang-x64-ninja-win7\llvm\tools\clang\tools\extra\clang-tidy\misc\SuspiciousStringCompareCheck.cpp D:\buildslave\clang-x64-ninja-win7\llvm\tools\clang\tools\extra\clang-tidy\misc\SuspiciousStringCompareCheck.cpp(25) : error C2144: syntax error : 'char' should be preceded by ';' D:\buildslave\clang-x64-ninja-win7\llvm\tools\clang\tools\extra\clang-tidy\misc\SuspiciousStringCompareCheck.cpp(25) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int ninja: build stopped: subcommand failed. program finished with exit code 1 ``` Reviewers: alexfh, sbenza Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19379 llvm-svn: 267027
* [clang-tidy] New checker to detect suspicious string constructor.Etienne Bergeron2016-04-214-0/+169
| | | | | | | | | | | | | | | | | | | Summary: Checker to validate string constructor parameters. A common mistake is to swap parameter for the fill-constructor. ``` std::string str('x', 4); std::string str('4', x); ``` Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19146 llvm-svn: 267011
* [clang-tidy] Add new checker for comparison with runtime string functions.Etienne Bergeron2016-04-214-0/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This checker is validating suspicious usage of string compare functions. Example: ``` if (strcmp(...)) // Implicitly compare to zero if (!strcmp(...)) // Won't warn if (strcmp(...) != 0) // Won't warn ``` This patch was checked over large amount of code. There is three checks: [*] Implicit comparator to zero (coding-style, many warnings found), [*] Suspicious implicit cast to non-integral (bugs!?, almost none found), [*] Comparison to suspicious constant (bugs!?, found two cases), Example: [[https://github.com/kylepjohnson/sigma/blob/master/sigma/native-installers/debian/dependencies/files/opt/sigma/E/HEURISTICS/che_to_precgen.c | https://github.com/kylepjohnson/sigma/blob/master/sigma/native-installers/debian/dependencies/files/opt/sigma/E/HEURISTICS/che_to_precgen.c]] ``` else if(strcmp(id, "select") == 0) { array->array[i].key1 = 25; } else if(strcmp(id, "sk") == 28) // BUG!? { array->array[i].key1 = 20; } ``` Reviewers: alexfh Subscribers: Eugene.Zelenko, cfe-commits Differential Revision: http://reviews.llvm.org/D18703 llvm-svn: 267009
* [clang-tidy] Cleanup some ast-matchers and lift some to utils.Etienne Bergeron2016-04-216-20/+10
| | | | | | | | | | | | | | | | Summary: Little cleanup to lift-out and to remove some frequently used ast-matchers. Some of theses matchers are candidates to be lifted to ASTMatchers.h. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D19200 llvm-svn: 267003
* clang-tidy: [misc-unused-using-decls] Support template types.Daniel Jasper2016-04-201-3/+7
| | | | | | This fixes llvm.org/PR27429. llvm-svn: 266866
* clang-tidy: [misc-unused-using-decls] Always use the canonical decl toDaniel Jasper2016-04-202-5/+7
| | | | | | | | identify things. This fixes llvm.org/PR27430. llvm-svn: 266864
* Initial version of misc-unused-using-decl check.Daniel Jasper2016-04-195-1/+120
| | | | llvm-svn: 266735
* Add missing override keyword to silence -Winconsistent-missing-override. NFCCraig Topper2016-04-161-1/+1
| | | | llvm-svn: 266511
* [clang-tidy] Add new checker for suspicious sizeof expressionsEtienne Bergeron2016-04-154-0/+309
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This check is finding suspicious cases of sizeof expression. Sizeof expression is returning the size (in bytes) of a type or an expression. Programmers often abuse or misuse this expression. This checker is adding common set of patterns to detect some of these bad constructs. Some examples found by this checker: R/packages/ifultools/ifultools/src/fra_neig.c ``` /* free buffer memory */ (void) mutil_free( dist_buff, sizeof( ctr * sizeof( double ) ) ); (void) mutil_free( nidx_buff, sizeof( ctr * sizeof( sint32 ) ) ); ``` graphviz/v2_20_2/lib/common/utils.c ``` static Dtdisc_t mapDisc = { offsetof(item, p), sizeof(2 * sizeof(void *)), offsetof(item, link), (Dtmake_f) newItem, (Dtfree_f) freeItem, (Dtcompar_f) cmpItem, NIL(Dthash_f), NIL(Dtmemory_f), NIL(Dtevent_f) }; ``` mDNSResponder/mDNSShared/dnsextd.c ``` context = ( TCPContext* ) malloc( sizeof( TCPContext ) ); require_action( context, exit, err = mStatus_NoMemoryErr; LogErr( "AcceptTCPConnection", "malloc" ) ); mDNSPlatformMemZero( context, sizeof( sizeof( TCPContext ) ) ); context->d = self; ``` Reviewers: alexfh Subscribers: malcolm.parsons, Eugene.Zelenko, cfe-commits Differential Revision: http://reviews.llvm.org/D19014 llvm-svn: 266451
* [clang-tidy] Add checker for operations between integrals and pointersEtienne Bergeron2016-04-154-0/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This check is finding suspicious operations involving pointers and integral types; which are most likely bugs. Examples: subversion/v1_6/subversion/libsvn_subr/utf.c ``` static const char * fuzzy_escape(const char *src, apr_size_t len, apr_pool_t *pool) { [...] while (src_orig < src_end) { if (! svn_ctype_isascii(*src_orig) || src_orig == '\0') // Should be *src_orig { ``` apache2/v2_2_23/modules/metadata/mod_headers.c ``` static char *parse_format_tag(apr_pool_t *p, format_tag *tag, const char **sa) { [...] tag->arg = '\0'; // ERROR: tag->arg has type char* /* grab the argument if there is one */ if (*s == '{') { ++s; tag->arg = ap_getword(p,&s,'}'); } ``` Reviewers: alexfh Subscribers: Eugene.Zelenko, cfe-commits Differential Revision: http://reviews.llvm.org/D19118 llvm-svn: 266450
* [clang-tidy] Add check misc-multiple-statement-macroSamuel Benzaquen2016-04-144-0/+147
| | | | | | | | | | | | | | | Summary: The check detects multi-statement macros that are used in unbraced conditionals. Only the first statement will be part of the conditionals and the rest will fall outside of it and executed unconditionally. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18766 llvm-svn: 266369
* [clang-tidy] add new checker for string literal with NUL character.Etienne Bergeron2016-04-074-0/+122
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds the support for detecting suspicious string literals and their //incorrect// usage. The following example shows a incorrect character escaping leading to an embedded NUL character. ``` std::string str = "\0x42"; // Should be "\x42". ``` The patch also add detection of truncated literal when a literal is passed to a string constructor. Reviewers: hokein, alexfh Subscribers: LegalizeAdulthood, bcraig, Eugene.Zelenko, bkramer, cfe-commits Differential Revision: http://reviews.llvm.org/D18783 llvm-svn: 265691
* [clang-tidy] Remove unnecessary getName() on Decls and Types feeding into a ↵Benjamin Kramer2016-04-076-27/+24
| | | | | | | | | | DiagnosticBuilder Going through a string removes some of the smarts of the diagnosic printer and makes the code more complicated. This change has some cosmetic impact on the output but that's mostly minor. llvm-svn: 265680
* [clang-tidy] Fix infinite loop in MisplacedWideningCastCheck.Etienne Bergeron2016-04-071-61/+87
| | | | | | | | | | | | | | | | | | Summary: In Release mode, the check was infinite looping over chromium code base. It seems there is something strange with the creation of the Maps. I believe the compiler is making some assumption with the implicit conversion from enum <-> int. By moving the map to a standard switch/cases, we no longer allocate memory and we can keep the same behavior. For a small amount of elements, this is fine. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18833 llvm-svn: 265679
* [clang-tidy] Assertion fix in misc-misplaced-widening-cast check.Gabor Horvath2016-04-061-3/+3
| | | | llvm-svn: 265544
* [clang-tidy] Extension of checker misc-misplaced-widening-castGabor Horvath2016-04-063-30/+113
| | | | | | | | | | | | | | | | | | Summary: Existing checker misc-misplaced-widening-cast was extended: - New use cases: casted expression as lhs or rhs of a logical comparison or function argument - New types: beside int, long and long long various char types, short and int128 added - New option to check implicit casts: forgetting a cast is at least as common and as dangerous as misplacing it. This option can be disabled. This patch depends on AST Matcher patches D17986 and D18243 and also contains fix for checker misc-bool-pointer-implicit-conversion needed because of the fix in the AST Matcher patch. Reviewers: hokein, alexfh Subscribers: o.gyorgy, xazax.hun, cfe-commits Differential Revision: http://reviews.llvm.org/D17987 llvm-svn: 265532
* [clang-tidy] Reduce false-positive ratio in misc-suspicious-missing-comma check.Etienne Bergeron2016-04-042-6/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is adding detection of common string literal patterns that should not trigger warnings. [*] Add a limit on the number of concatenated token, [*] Add support for parenthese sequence of tokens, [*] Add detection of valid indentation. As an example, this code will no longer trigger a warning: ``` const char* Array[] = { "first literal" "indented literal" "indented literal", "second literal", [...] ``` Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D18695 llvm-svn: 265303
* [clang-tidy] Don't delete unused parameter in class override method in ↵Haojian Wu2016-04-011-10/+12
| | | | | | | | | | | | | | anonymous namespace. Summary: Fixes PR26740. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D17926 llvm-svn: 265117
* [clang-tidy] Add a new checker to detect missing comma in initializer list.Etienne Bergeron2016-03-314-0/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This checker is able to detect missing comma in an array of string literals. ``` const char* A[] = { "abc", "def" // missing comma (no compiler warnings) "ghi", }; ``` The ratio of false-positive is reduced by restricting the size of the array considered and the ratio of missing comma. To validate the quantity of false positive, the checker was tried over LLVM and chromium code and detected these cases: [[ http://reviews.llvm.org/D18454 | http://reviews.llvm.org/D18454 ]] [[https://codereview.chromium.org/1807753002/ | https://codereview.chromium.org/1807753002/]] [[https://codereview.chromium.org/1826193002/ | https://codereview.chromium.org/1826193002/]] [[https://codereview.chromium.org/1805713002/ | https://codereview.chromium.org/1805713002/]] Reviewers: alexfh Subscribers: LegalizeAdulthood, szdominik, xazax.hun, cfe-commits Differential Revision: http://reviews.llvm.org/D18457 llvm-svn: 265033
* [clang-tidy] Adjust dangling references check to ASTMatcher changes.Gabor Horvath2016-03-301-9/+10
| | | | llvm-svn: 264859
* [clang-tidy] Add check to detect dangling references in value handlers.Samuel Benzaquen2016-03-294-0/+232
| | | | | | | | | | | | | | | | | | | | | | Summary: Add check misc-dangling-handle to detect dangling references in value handlers like std::experimental::string_view. It provides a configuration option to specify other handle types that should also be checked. Right now it detects: - Construction from temporaries. - Assignment from temporaries. - Return statements from temporaries or locals. - Insertion into containers from temporaries. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D17811 llvm-svn: 264759
* [clang-tidy] misc-assign-operator-signature checker checks return value of ↵Gabor Horvath2016-03-241-7/+8
| | | | | | | | | | | | | | all assign operators The return value of every assign operator should be Type&, not only for copy and move assign operators. Patch by Adam Balogh! Reviewers: hokein, alexfh Differential Revision: http://reviews.llvm.org/D18264 llvm-svn: 264251
* [clang-tidy] Fix check broken in rL263822.Samuel Benzaquen2016-03-211-1/+2
| | | | | | Add names missing from rL263822 and add tests to prevent future omissions. llvm-svn: 263963
* [clang-tidy] Use hasAnyName() instead of matchesName().Samuel Benzaquen2016-03-181-5/+8
| | | | | | | | | matchesName() uses regular expressions and it is very slow. hasAnyName() gives the same result and it is much faster. A benchmark (with all the checks enabled) shows a ~5% speed up of clang-tidy. llvm-svn: 263822
* [clang-tidy] Do not emit warnings from misc-suspicious-semicolon when the ↵Gabor Horvath2016-03-031-1/+4
| | | | | | compilation fails. llvm-svn: 262615
* [clang-tidy] Added a check for forward declaration in the potentially wrong ↵Alexander Kornienko2016-02-244-0/+237
| | | | | | | | | | | | | | | | | namespace Adds a new check "misc-forward-declaration-namespace". In check, A forward declaration is considerred in a potentially wrong namespace if there is any definition/declaration with the same name exists in a different namespace. Reviewers: akuegel, hokein, alexfh Patch by Eric Liu! Differential Revision: http://reviews.llvm.org/D17195 llvm-svn: 261737
* [clang-tidy] Fix failure in 'misc-misplaced-widening-cast' test.Daniel Marjamaki2016-02-121-4/+9
| | | | | | | | I added portability warnings when int results are casted to long. I forgot to handle uint, ulong and ulonglong. Tested on x86 and powerpc targets, hope it works now on all buildbots. llvm-svn: 260667
* [clang-tidy] improve misc-misplaced-widening-cast so it also detects ↵Daniel Marjamaki2016-02-121-3/+22
| | | | | | | | | | | | portability problems. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D17140 llvm-svn: 260665
* Merge branch 'arcpatch-D16922'Cong Liu2016-02-112-8/+15
| | | | llvm-svn: 260532
* [clang-tidy] Add a check to find unintended semicolons that changes the ↵Gabor Horvath2016-02-114-0/+114
| | | | | | | | | | semantics. Reviewers: hokein, alexfh Differential Revision: http://reviews.llvm.org/D16535 llvm-svn: 260503
* [clang-tidy] Add 'misc-misplaced-widening-cast' check.Daniel Marjamaki2016-02-094-0/+148
| | | | | | | | | | Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16310 llvm-svn: 260223
* [clang-tidy] Some improvements in 'misc-definitions-in-headers' check.Haojian Wu2016-02-081-0/+4
| | | | | | | | | | Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16979 llvm-svn: 260108
* [clang-tidy] Correct IncorrectRoundings namespace.Haojian Wu2016-02-082-1/+4
| | | | | | | | | | Reviewers: alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16987 llvm-svn: 260105
* [clang-tidy] Move incorrect-roundings to upstream.Haojian Wu2016-02-084-1/+117
| | | | | | | | | | | | Summary: This is originally implemented by Jacques Pienaar. Reviewers: alexfh Subscribers: cfe-commits, jpienaar Differential Revision: http://reviews.llvm.org/D16764 llvm-svn: 260084
* [clang-tdiy] Add header file extension configuration support.Haojian Wu2016-02-052-23/+43
| | | | | | | | | | | | Summary: * Add a `HeaderFileExtensions` check option in misc-definitions-in-headers, google-build-namespaces and google-global-names-in-headers. Reviewers: aaron.ballman, alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16113 llvm-svn: 259879
* [clang-tidy] Fix a crash issue on misc-virtual-near-miss check.Haojian Wu2016-02-031-0/+3
| | | | | | | | | | | | | | Summary: The crash is caused by triggering a Assertion failed in DeclCXX.h when the check detects non-defined class return type in a class method declaration. Reviewers: congliu, alexfh Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D16854 llvm-svn: 259668
OpenPOWER on IntegriCloud