[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-10-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D52835#1263032, @xbolva00 wrote: > As noted, this in under LiteralConversion (-Wconversion). GCC has it too > under -Wconversion, so I think it is fine as is, or? > @rsmith It's not so much about "which flag group do i need to enable to

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-10-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. So any suggestions? https://reviews.llvm.org/D52835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53186: [clangd] Support hover on "aut^o *".

2018-10-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added subscribers: arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53186 Files: clangd/XRefs.cpp unittests/clangd/XRefsTests.cpp Index: unittests/clangd

[PATCH] D53024: [analyzer][www] Add more open projects

2018-10-12 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. In https://reviews.llvm.org/D53024#1262976, @george.karpenkov wrote: > @Szelethus I take it this is mostly formed from @NoQ email? Language could > use polishing in quite a few places, could I just commandeer this revision > and try to fix it? Yes it is. Though the

[PATCH] D53121: [Driver] Add defaults for Android ARM FPUs.

2018-10-12 Thread Kristof Beyls via Phabricator via cfe-commits
kristof.beyls added inline comments. Comment at: test/Driver/arm-mfpu.c:410 + +// RUN: %clang -target armv7-linux-androideabi23 %s -mfpu=vfp3-d16 -### -c 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-ARM-ANDROID-M-FP-D16 %s danalbert wrote: > >>! In D53121#

[PATCH] D53121: [Driver] Add defaults for Android ARM FPUs.

2018-10-12 Thread Peter Smith via Phabricator via cfe-commits
peter.smith accepted this revision. peter.smith added a comment. This revision is now accepted and ready to land. Looks good to me. By generic target I just meant --target=arm-linux-androideabi21 with a -march to specify the revision, which you've got in the test. Repository: rC Clang https

[PATCH] D53187: [clang-tidy] Optimize query in bugprone-exception-escape

2018-10-12 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added reviewers: JonasToth, alexfh, aaron.ballman. baloghadamsoftware added a project: clang-tools-extra. Herald added subscribers: Szelethus, dkrupp, rnkovacs, xazax.hun, whisperity. Checking whether a functions throws indirectly may be

[PATCH] D52971: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py to support multiple prefixes

2018-10-12 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In https://reviews.llvm.org/D52971#1262200, @ymandel wrote: > Hi, > > It looks like this change has disabled FileCheck for all clang-tidy lit tests > that don't use check-prefixes. So, they all trivially pass even if their > CHECK... lines are wrong. An easy repro

[PATCH] D53186: [clangd] Support hover on "aut^o *".

2018-10-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM, thanks! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53186 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D53188: [clangd] XRef C++ API returns structure results, NFC

2018-10-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. The representation of references in LSP is limitted (just location information). This patch makes our xref C++ API return structured results, w

[clang-tools-extra] r344330 - [clangd] Support hover on "aut^o *".

2018-10-12 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Oct 12 03:11:02 2018 New Revision: 344330 URL: http://llvm.org/viewvc/llvm-project?rev=344330&view=rev Log: [clangd] Support hover on "aut^o *". Reviewers: kadircet Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https:

[PATCH] D53186: [clangd] Support hover on "aut^o *".

2018-10-12 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344330: [clangd] Support hover on "aut^o *". (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D53186?vs=169357&id=169363#to

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-10-12 Thread Whisperity via Phabricator via cfe-commits
whisperity accepted this revision. whisperity added a comment. This revision is now accepted and ready to land. Have been looked at this far and wide too many times now. I say we roll this out and fix and improve later on, lest this only going into Clang 72. Results look promising, let's hope us

[PATCH] D51340: Add /Zc:DllexportInlines option to clang-cl

2018-10-12 Thread Takuto Ikuta via Phabricator via cfe-commits
takuto.ikuta added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:11976 + +while (FD && !getDLLAttr(FD) && + !FD->hasAttr() && hans wrote: > takuto.ikuta wrote: > > hans wrote: > > > takuto.ikuta wrote: > > > > hans wrote: > > > > > Why do

[PATCH] D51340: Add /Zc:DllexportInlines option to clang-cl

2018-10-12 Thread Takuto Ikuta via Phabricator via cfe-commits
takuto.ikuta updated this revision to Diff 169365. takuto.ikuta added a comment. Address comment https://reviews.llvm.org/D51340 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/LangOptions.h clang/include/clang/Driver/CC1Options.td clang/include/clang/Driver/CLCompatO

r344333 - Fix Wdocumentation warning. NFCI.

2018-10-12 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Fri Oct 12 03:34:03 2018 New Revision: 344333 URL: http://llvm.org/viewvc/llvm-project?rev=344333&view=rev Log: Fix Wdocumentation warning. NFCI. Modified: cfe/trunk/include/clang/AST/DeclTemplate.h Modified: cfe/trunk/include/clang/AST/DeclTemplate.h URL: http://llvm.

[PATCH] D33672: [analyzer] INT50-CPP. Do not cast to an out-of-range enumeration checker

2018-10-12 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. Herald added subscribers: donat.nagy, Szelethus, mikhail.ramalho, rnkovacs, szepet. Herald added a reviewer: george.karpenkov. //Soft ping.// https://reviews.llvm.org/D33672 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D53135: Remove top-level using declaration from header files, as these aliases leak.

2018-10-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: include/clang/Driver/Job.h:33 // Re-export this as clang::driver::ArgStringList. -using llvm::opt::ArgStringList; +using ArgStringList = llvm::opt::ArgStringList; ilya-biryukov wrote: > Both approaches seem equivale

[PATCH] D53188: [clangd] XRef C++ API returns structure results, NFC

2018-10-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein planned changes to this revision. hokein added a comment. As discussed offline, we don't have a clear motivation to do it now, and LSP will likely introduce a new `References` type of xrefs (https://github.com/Microsoft/language-server-protocol/issues/396), so I'll leave this patch opene

[PATCH] D51484: [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extension

2018-10-12 Thread Alexey Sachkov via Phabricator via cfe-commits
AlexeySachkov updated this revision to Diff 169368. AlexeySachkov marked an inline comment as done. AlexeySachkov added a comment. Updated tests. Reverted usage of `#pragma OPENCL EXTENSION my_ext : begin` due to a failed LIT tests: `test/Headers/opencl-c-header.cl` Test failed on the following

[PATCH] D51484: [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extension

2018-10-12 Thread Alexey Sachkov via Phabricator via cfe-commits
AlexeySachkov added inline comments. Comment at: test/SemaOpenCL/intel-subgroup-avc-ext-types.cl:26 + char4 c4, event_t e, struct st ss) { + intel_sub_group_avc_mce_payload_t payload_mce = 0; // No zero initializer for mce types + // expected-error@-1 {{initializing 'i

r344335 - [Tooling] Expose ExecutorName option.

2018-10-12 Thread Eric Liu via cfe-commits
Author: ioeric Date: Fri Oct 12 04:47:36 2018 New Revision: 344335 URL: http://llvm.org/viewvc/llvm-project?rev=344335&view=rev Log: [Tooling] Expose ExecutorName option. Modified: cfe/trunk/include/clang/Tooling/Execution.h cfe/trunk/lib/Tooling/Execution.cpp Modified: cfe/trunk/include

[PATCH] D53131: [clangd] Support scope proximity in code completion.

2018-10-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. (BTW I wouldn't expect to see improvements on eval here, as Comment at: clangd/CodeComplete.cpp:558 +if (const auto *NS = dyn_cast(Ctx)) + return NS->getQualifiedNameAsString() + "::"; + return llvm::None; ioeric wrote: > sa

[PATCH] D53170: [clang-doc] Switch to default to all-TUs executor

2018-10-12 Thread Eric Liu via Phabricator via cfe-commits
ioeric requested changes to this revision. ioeric added inline comments. This revision now requires changes to proceed. Comment at: clang-tools-extra/clang-doc/tool/ClangDocMain.cpp:203 +llvm::Expected> +createClangDocExecutor(int &argc, const char **argv, +

[PATCH] D33672: [analyzer] INT50-CPP. Do not cast to an out-of-range enumeration checker

2018-10-12 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Also needs an entry to `www/analyzer/alpha_checks.html`. Comment at: test/Analysis/enum-cast-out-of-range.cpp:1 +// RUN: %clang_cc1 -std=c++11 -analyze -analyzer-checker=alpha.cplusplus.EnumCastOutOfRange -verify %s + 1. Prefer `%cla

[PATCH] D53191: [clang] Use Statement and Namespace instead of Name and PotentiallyQualifiedName

2018-10-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added a subscriber: cfe-commits. New name suggestion contexts were being used in cases they were not suitable. This patch changes those contexts into more suitable ones. Repository: rC Clang https://reviews.llvm.org/

[PATCH] D53153: [OpenCL] Mark namespace scope variables and kernel functions with default visibility

2018-10-12 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: lib/AST/Decl.cpp:565 +return FD->hasAttr(); + return dyn_cast(D); +} isa Repository: rC Clang https://reviews.llvm.org/D53153 ___ cfe-commits mailing list cfe-commi

[PATCH] D33672: [analyzer] INT50-CPP. Do not cast to an out-of-range enumeration checker

2018-10-12 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:296-299 +def EnumCastOutOfRangeChecker : Checker<"EnumCastOutOfRange">, + HelpText<"Check integer to enumeration casts for out of range values">, + DescFile<"EnumCastOutOfRange.cpp">;

[PATCH] D53192: [clangd] Do not query index for new name completions.

2018-10-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53192 Files: clangd/CodeComplete.cpp unittests/clangd/CodeCompleteTe

[PATCH] D53191: [clang] Use Statement and Namespace instead of Name and PotentiallyQualifiedName

2018-10-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 169374. kadircet added a comment. - Use statement as context for using decls. Repository: rC Clang https://reviews.llvm.org/D53191 Files: lib/Sema/SemaCodeComplete.cpp test/CodeCompletion/ordinary-name.c Index: test/CodeCompletion/ordinary-name.c

[PATCH] D53191: [clang] Use Statement and Namespace instead of Name and PotentiallyQualifiedName

2018-10-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:4825 if (SS.isInvalid()) { -CodeCompletionContext CC(CodeCompletionContext::CCC_Name); +CodeCompletionContext CC(CodeCompletionContext::CCC_Statement); CC.setCXXScopeSpecifier(SS);

[PATCH] D53135: Remove top-level using declaration from header files, as these aliases leak.

2018-10-12 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344337: Remove top-level using declaration from header files, as these aliases leak. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews

r344337 - Remove top-level using declaration from header files, as these aliases leak.

2018-10-12 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Oct 12 05:21:29 2018 New Revision: 344337 URL: http://llvm.org/viewvc/llvm-project?rev=344337&view=rev Log: Remove top-level using declaration from header files, as these aliases leak. Reviewers: ilya-biryukov Subscribers: arphaman, cfe-commits Differential Revision:

[PATCH] D53194: [clang-tidy] Fix check_clang_tidy.py trivially passing default CHECK

2018-10-12 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. zinovy.nis added reviewers: ymandel, alexfh. zinovy.nis added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. In https://reviews.llvm.org/D52971#1262200, @ymandel wrote: > Hi, > > It looks like this change has disabled FileCheck f

[PATCH] D53032: [clangd] Minimal implementation of automatic static index, behind a flag.

2018-10-12 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Looks good in general. Comment at: clangd/ClangdLSPServer.h:117 +llvm::Optional CompileCommandsDir, +std::function); please document what the callback is for and how often it's called. Comment at: clang

[PATCH] D52301: [clang] Set TypeSourceInfo for vardecl's in addition to type when we can deduce.

2018-10-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: rsmith. aaron.ballman added a comment. Can you give a bit more background on what problem you're trying to solve with this patch? Comment at: lib/Sema/SemaChecking.cpp:852 - if (RT->getPointeeType().getAddressSpace() != LangAS::opencl_generic

[PATCH] D53187: [clang-tidy] Optimize query in bugprone-exception-escape

2018-10-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. This looks reasonable to me but could you please explain a bit what the issue was in the bugreport? So a very deep hierarchy causing the problem makes sense, but why was "ignoring first" the difference maker? Would it make sense to add a warning in the documentation th

[PATCH] D52727: [clang-tidy] White List Option for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-10-12 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D52727#1261901, @JonasToth wrote: > LG in principle, just the SmallVec thing could be done if you agree. I don't > insist on it, but it looks like a performance benefit to me. I principally agree, but then I also have to duplicate

[PATCH] D53194: [clang-tidy] Fix check_clang_tidy.py trivially passing default CHECK

2018-10-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth accepted this revision. JonasToth added a comment. This revision is now accepted and ready to land. Did you verify it actually works? Otherwise LGTM and because its a bug-fix you can commit and other concerns can be done post-commit. Comment at: test/clang-tidy/check

[PATCH] D52727: [clang-tidy] White List Option for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-10-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I see, probably not worth it. Its one-time effort anyway right? LGTM https://reviews.llvm.org/D52727 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53187: [clang-tidy] Optimize query in bugprone-exception-escape

2018-10-12 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. I think that with this optimization it is not so expensive anymore. I do not think it was an endless loop in the bugreport but it was insufferable execution time. Maybe we could speed it up a little more by changing it totally to a width-first CFG visitor. Th

[clang-tools-extra] r344340 - [clang-tidy] White List Option for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-10-12 Thread Adam Balogh via cfe-commits
Author: baloghadamsoftware Date: Fri Oct 12 06:05:21 2018 New Revision: 344340 URL: http://llvm.org/viewvc/llvm-project?rev=344340&view=rev Log: [clang-tidy] White List Option for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy New

[PATCH] D52727: [clang-tidy] White List Option for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-10-12 Thread Balogh , Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344340: [clang-tidy] White List Option for performance-unnecessary-value-param… (authored by baloghadamsoftware, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https:

[PATCH] D52727: [clang-tidy] White List Option for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-10-12 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Maybe it should be done in a separate patch together for all checks using that utility function. So there would be no need for duplication but the original functions should be changed instead. Repository: rL LLVM https://reviews.llvm.org/D52727 ___

[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-10-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D41648#1253647, @JonasToth wrote: > @aaron.ballman What do you think of the current version of this check? > As migration strategy the option for `CAPS_ONLY` is provided, otherwise the > filtering is provided to silence necessary macros

[PATCH] D53195: [MinGW] Allow using LTO when lld is used as linker

2018-10-12 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. mstorsjo added reviewers: rnk, ruiu, smeenai, compnerd. Herald added subscribers: dexonsmith, inglorion. Repository: rC Clang https://reviews.llvm.org/D53195 Files: lib/Driver/ToolChains/MinGW.cpp lib/Driver/ToolChains/MinGW.h Index: lib/Driver/ToolChains/

[PATCH] D52784: [ARM][AArch64] Pass through endianness flags to the GNU assembler and linker

2018-10-12 Thread Peter Smith via Phabricator via cfe-commits
peter.smith updated this revision to Diff 169386. peter.smith added a comment. I've decided to roll the linker changes in with the assembler ones as the linker use case affects the design. It turns out that only Arm needs to check to see if the -mbig-endian and -mlittle-endian flags override the

[PATCH] D53187: [clang-tidy] Optimize query in bugprone-exception-escape

2018-10-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In https://reviews.llvm.org/D53187#1263294, @baloghadamsoftware wrote: > I think that with this optimization it is not so expensive anymore. I do not > think it was an endless loop in the bugreport but it was insufferable > execution time. Maybe we could speed it up a

[PATCH] D52892: [Clang-tidy] readability check to convert numerical constants to std::numeric_limits

2018-10-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I like the thrust of this check, but we already have the readability-magic-numbers check and I think that this functionality would fit naturally there. That check finds numerical constants and recommends turning them into named constants, but for special values it

[PATCH] D53187: [clang-tidy] Optimize query in bugprone-exception-escape

2018-10-12 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D53187#1263323, @JonasToth wrote: > In https://reviews.llvm.org/D53187#1263294, @baloghadamsoftware wrote: > > > I think that with this optimization it is not so expensive anymore. I do > > not think it was an endless loop in the bu

[PATCH] D53195: [MinGW] Allow using LTO when lld is used as linker

2018-10-12 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 169387. mstorsjo added a comment. Herald added subscribers: steven_wu, mehdi_amini. Added a minimal testcase. https://reviews.llvm.org/D53195 Files: lib/Driver/ToolChains/MinGW.cpp lib/Driver/ToolChains/MinGW.h test/Driver/mingw-lto.c Index: test/D

[PATCH] D51949: [clang-tidy] new check 'readability-isolate-declaration'

2018-10-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. > Unfortunately, I won't be able to review the code in the upcoming few weeks > as I caught a cold and I'm trying to get better before the LLVM Meeting, so > if there is anyone else interested in reviewing proposed changes please feel > free to jump in. Thank you ver

[PATCH] D53194: [clang-tidy] Fix check_clang_tidy.py trivially passing default CHECK

2018-10-12 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL344343: [clang-tidy] Fix check_clang_tidy.py trivially passing default CHECK (authored by zinovy.nis, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.ll

[clang-tools-extra] r344343 - [clang-tidy] Fix check_clang_tidy.py trivially passing default CHECK

2018-10-12 Thread Zinovy Nis via cfe-commits
Author: zinovy.nis Date: Fri Oct 12 06:35:47 2018 New Revision: 344343 URL: http://llvm.org/viewvc/llvm-project?rev=344343&view=rev Log: [clang-tidy] Fix check_clang_tidy.py trivially passing default CHECK Differential Revision: https://reviews.llvm.org/D53194 Modified: clang-tools-extra/tru

[PATCH] D53187: [clang-tidy] Optimize query in bugprone-exception-escape

2018-10-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. > Thousands? After the query optimization the max was 173, and that only for a > single function. The next number was 64. See https://bugs.llvm.org/attachment.cgi?id=20963 I did not run again with your patch. But even 173 and 64 seem like a lot and might be worth opti

[PATCH] D51949: [clang-tidy] new check 'readability-isolate-declaration'

2018-10-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 169389. JonasToth added a comment. - fix headline in doc Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51949 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/IsolateDeclarationCheck.cpp clang-tidy/readability/Iso

[PATCH] D53025: [clang-tidy] implement new check for const return types.

2018-10-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/readability/ConstValueReturnCheck.cpp:25 + +// Finds the location of the relevant "const" token in `Def`. +llvm::Optional findConstToRemove( ymandel wrote: > JonasToth wrote: > > s/"const"/`const` > here and

[PATCH] D52892: [Clang-tidy] readability check to convert numerical constants to std::numeric_limits

2018-10-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In https://reviews.llvm.org/D52892#1263324, @aaron.ballman wrote: > I like the thrust of this check, but we already have the > readability-magic-numbers check and I think that this functionality would fit > naturally there. That check finds numerical constants and rec

[PATCH] D53038: [Hexagon] Use GetLinkerPath method instead of hard-coded linker name.

2018-10-12 Thread David Zarzycki via Phabricator via cfe-commits
davezarzycki added a comment. A bisect revealed this change as the source of test failures on my Red Hat Fedora 28 Linux box. How was/is this tested? Command Output (stderr): /home/dave/s/lc/tools/clang/test/Driver/linux-ld.c:882:19: error: CHECK-HEXAGON: expected stri

[PATCH] D53197: [clang-format] Fix BraceWrapping AfterFunction for ObjC methods

2018-10-12 Thread Marcus Hultman via Phabricator via cfe-commits
hultman created this revision. Herald added a subscriber: cfe-commits. > clang-format --version > clang-format version 7.0.0 (tags/RELEASE_700/final) > echo "@implementation Foo\n- (void)foo:(id)bar\n{\n}\n@end\n" |clang-format > -style='{BreakBeforeBraces: Custom, BraceWrapping: {AfterFunction

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-10-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! https://reviews.llvm.org/D45050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53032: [clangd] Minimal implementation of automatic static index, behind a flag.

2018-10-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 6 inline comments as done. sammccall added inline comments. Comment at: clangd/index/Background.cpp:98 + } + llvm::sys::path::native(AbsolutePath); + ioeric wrote: > Why is this needed? Removed. I copied it from the related code in JSONCompilat

[PATCH] D53032: [clangd] Minimal implementation of automatic static index, behind a flag.

2018-10-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 169399. sammccall marked 4 inline comments as done. sammccall added a comment. Address comments, add tests. Some changes (enqueue(), blockUntilIdleForTest()) to support testing. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53032 Files:

[PATCH] D53032: [clangd] Minimal implementation of automatic static index, behind a flag.

2018-10-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 169400. sammccall added a comment. Oops, forgot one comment. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53032 Files: clangd/CMakeLists.txt clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer.h clangd/ClangdServer.cpp clangd/Co

[PATCH] D53032: [clangd] Minimal implementation of automatic static index, behind a flag.

2018-10-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/ClangdLSPServer.h:117 +llvm::Optional CompileCommandsDir, +std::function); ioeric wrote: > please document what the callback is for and how often it's called. Documented at the callsite and in Gl

[PATCH] D52771: [clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines, HICPP)

2018-10-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 169401. lebedev.ri marked 2 inline comments as done. lebedev.ri edited the summary of this revision. lebedev.ri added a comment. Let's try to wrap this up. - Dropped HICPP alias. I/we really don't understand what those guidelines require. - Don't touch un

[PATCH] D52771: [clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines, HICPP)

2018-10-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.cpp:56 + auto RecordIsInteresting = + allOf(anyOf(isStruct(), isClass()), hasMethods(), hasNonStaticMethod(), +IgnoreClassesWithAllMemberVariablesBeingPublic --

[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-10-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 169402. JonasToth marked 3 inline comments as done. JonasToth added a comment. - add tests and adjust doc - one more test case Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41648 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt cla

[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-10-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Updated Comment at: clang-tidy/cppcoreguidelines/MacroUsageCheck.cpp:78 +"function-like macro used; consider a 'constexpr' template function"; + if (Info->isVariadic()) +DiagnosticMessage = "variadic macro used; consider using a 'constexp

[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-10-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 169403. JonasToth added a comment. - remove unused enum in header file, no idea what i intended to do with it :D Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41648 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcor

[PATCH] D53197: [clang-format] Fix BraceWrapping AfterFunction for ObjC methods

2018-10-12 Thread Marcus Hultman via Phabricator via cfe-commits
hultman added reviewers: benhamilton, jolesiak, klimek, Wizard. hultman added a comment. This bug was introduced in revision 333553, authored by benhamilton, reviewed by jolesiak, klimek. Repository: rC Clang https://reviews.llvm.org/D53197 ___

[PATCH] D52771: [clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines, HICPP)

2018-10-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 169405. lebedev.ri added a comment. Dead code elimination. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52771 Files: clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/misc/CMakeLists.txt clang-tidy/misc/Misc

[PATCH] D52771: [clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines, HICPP)

2018-10-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: test/clang-tidy/misc-non-private-member-variables-in-classes.cpp:1 +// RUN: %check_clang_tidy -check-suffix=NONPRIVATE %s misc-non-private-member-variables-in-classes %t +// RUN: %check_clang_tidy -check-suffix=NONPRIVATE %s misc-non

[PATCH] D53197: [clang-format] Fix BraceWrapping AfterFunction for ObjC methods

2018-10-12 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton accepted this revision. benhamilton added a comment. This revision is now accepted and ready to land. Thanks! Repository: rC Clang https://reviews.llvm.org/D53197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

2018-10-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 169407. xbolva00 added a comment. - check for overflow when evaluating https://reviews.llvm.org/D52750 Files: include/clang/AST/Expr.h lib/AST/ExprConstant.cpp lib/Sema/SemaExpr.cpp test/Sema/integer-overflow.c Index: test/Sema/integer-overflow.c

[PATCH] D53032: [clangd] Minimal implementation of automatic static index, behind a flag.

2018-10-12 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added inline comments. This revision is now accepted and ready to land. Comment at: clangd/index/Background.cpp:51 + std::unique_lock Lock(QueueMu); + assert(!HasActiveTask); + QueueCV.wait(Lock, [&] { return ShouldStop || !Que

[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

2018-10-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 169408. https://reviews.llvm.org/D52750 Files: include/clang/AST/Expr.h lib/AST/ExprConstant.cpp lib/Sema/SemaExpr.cpp test/Sema/integer-overflow.c Index: test/Sema/integer-overflow.c

r344352 - Fix MSVC 2015 ambiguous symbol warning introduced by rL344337. NFCI.

2018-10-12 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Fri Oct 12 08:16:25 2018 New Revision: 344352 URL: http://llvm.org/viewvc/llvm-project?rev=344352&view=rev Log: Fix MSVC 2015 ambiguous symbol warning introduced by rL344337. NFCI. Modified: cfe/trunk/lib/Driver/Compilation.cpp Modified: cfe/trunk/lib/Driver/Compilation

[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

2018-10-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 169409. xbolva00 added a comment. - Undo extra newline https://reviews.llvm.org/D52750 Files: include/clang/AST/Expr.h lib/AST/ExprConstant.cpp lib/Sema/SemaExpr.cpp test/Sema/integer-overflow.c Index: test/Sema/integer-overflow.c ===

[PATCH] D53032: [clangd] Minimal implementation of automatic static index, behind a flag.

2018-10-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: unittests/clangd/BackgroundIndexTests.cpp:14 + +TEST(BackgroundIndexTest, IndexesOneFile) { + MockFSProvider FS; ioeric wrote: > Also add a test for `enqueueAll` with multiple TUs ? Is it important to call `enqueueAll

[PATCH] D45050: [clang-tidy] New checker for not null-terminated result caused by strlen(), size() or equal length

2018-10-12 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. @aaron.ballman Neither I nor @Charusso has commit rights, could you please commit this in our stead? https://reviews.llvm.org/D45050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

[PATCH] D53032: [clangd] Minimal implementation of automatic static index, behind a flag.

2018-10-12 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: unittests/clangd/BackgroundIndexTests.cpp:14 + +TEST(BackgroundIndexTest, IndexesOneFile) { + MockFSProvider FS; sammccall wrote: > ioeric wrote: > > Also add a test for `enqueueAll` with multiple TUs ? > Is it important

[PATCH] D53197: [clang-format] Fix BraceWrapping AfterFunction for ObjC methods

2018-10-12 Thread Marcus Hultman via Phabricator via cfe-commits
hultman added a comment. @benhamilton Could you land this patch? Repository: rC Clang https://reviews.llvm.org/D53197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-10-12 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 169410. JonasToth added a comment. - make the logic with variadic clear Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41648 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.c

[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

2018-10-12 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. This doesn't produce a warning in C++11 and up. https://reviews.llvm.org/D52750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53170: [clang-doc] Switch to default to all-TUs executor

2018-10-12 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 169411. https://reviews.llvm.org/D53170 Files: clang-tools-extra/clang-doc/tool/ClangDocMain.cpp Index: clang-tools-extra/clang-doc/tool/ClangDocMain.cpp === --- clang-tools-extra/clang-

[PATCH] D53170: [clang-doc] Switch to default to all-TUs executor

2018-10-12 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett marked 3 inline comments as done. juliehockett added inline comments. Comment at: clang-tools-extra/clang-doc/tool/ClangDocMain.cpp:203 +llvm::Expected> +createClangDocExecutor(int &argc, const char **argv, + llvm::cl::OptionCategory &Category)

[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

2018-10-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In https://reviews.llvm.org/D52750#1263461, @Rakete wrote: > This doesn't produce a warning in C++11 and up. But see Richard's comment: https://reviews.llvm.org/D52750#1251759 https://reviews.llvm.org/D52750 ___ cfe-

[PATCH] D53170: [clang-doc] Switch to default to all-TUs executor

2018-10-12 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-tools-extra/clang-doc/tool/ClangDocMain.cpp:89 llvm::cl::init(false), llvm::cl::cat(ClangDocCategory)); +static llvm::cl::opt ClangDocExecutorName( This flag can also be removed. Users can still use `--execut

[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

2018-10-12 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. In https://reviews.llvm.org/D52750#1263466, @xbolva00 wrote: > In https://reviews.llvm.org/D52750#1263461, @Rakete wrote: > > > This doesn't produce a warning in C++11 and up. > > > But see Richard's comment: https://reviews.llvm.org/D52750#125175 so I am not > su

[PATCH] D53032: [clangd] Minimal implementation of automatic static index, behind a flag.

2018-10-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: unittests/clangd/BackgroundIndexTests.cpp:14 + +TEST(BackgroundIndexTest, IndexesOneFile) { + MockFSProvider FS; ioeric wrote: > sammccall wrote: > > ioeric wrote: > > > Also add a test for `enqueueAll` with multiple

[PATCH] D53199: Fix the behavior of clang's -w flag.

2018-10-12 Thread James Y Knight via Phabricator via cfe-commits
jyknight created this revision. jyknight added a reviewer: rsmith. It is intended to disable _all_ warnings, even those upgraded to errors via `-Werror=warningname` or `#pragma clang diagnostic error' https://reviews.llvm.org/D53199 Files: clang/lib/Basic/DiagnosticIDs.cpp clang/test/Fronte

[PATCH] D52750: [Diagnostics] Check for integer overflow in array size expressions

2018-10-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. That's fine :) btw, thanks for review comments! Hopefully, this solution would be now acceptable :) https://reviews.llvm.org/D52750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

[PATCH] D53170: [clang-doc] Switch to default to all-TUs executor

2018-10-12 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 169414. juliehockett marked 3 inline comments as done. https://reviews.llvm.org/D53170 Files: clang-tools-extra/clang-doc/tool/ClangDocMain.cpp Index: clang-tools-extra/clang-doc/tool/ClangDocMain.cpp =

[PATCH] D53153: [OpenCL] Mark namespace scope variables and kernel functions with default visibility

2018-10-12 Thread Scott Linder via Phabricator via cfe-commits
scott.linder updated this revision to Diff 169417. scott.linder added a comment. Address feedback https://reviews.llvm.org/D53153 Files: lib/AST/Decl.cpp test/CodeGenOpenCL/visibility.cl Index: test/CodeGenOpenCL/visibility.cl ==

[PATCH] D53200: [OpenCL] Fix serialization of OpenCLExtensionDecls

2018-10-12 Thread Alexey Sachkov via Phabricator via cfe-commits
AlexeySachkov created this revision. AlexeySachkov added reviewers: Anastasia, yaxunl. I recently discovered that adding the following code into `opencl-c.h` causes failure of `test/Headers/opencl-c-header.cl`: #pragma OPENCL EXTENSION cl_my_ext : begin void cl_my_ext_foobarbaz(); #pragma O

[PATCH] D53032: [clangd] Minimal implementation of automatic static index, behind a flag.

2018-10-12 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: unittests/clangd/BackgroundIndexTests.cpp:14 + +TEST(BackgroundIndexTest, IndexesOneFile) { + MockFSProvider FS; sammccall wrote: > ioeric wrote: > > sammccall wrote: > > > ioeric wrote: > > > > Also add a test for `enqu

r344356 - [OPENMP][NVPTX]Reduce memory usage in orphaned functions.

2018-10-12 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Oct 12 09:04:20 2018 New Revision: 344356 URL: http://llvm.org/viewvc/llvm-project?rev=344356&view=rev Log: [OPENMP][NVPTX]Reduce memory usage in orphaned functions. if the function has globalized variables and called in context of target/teams/distribute regions, it doe

[PATCH] D49244: Always search sysroot for GCC installs

2018-10-12 Thread David Greene via Phabricator via cfe-commits
greened added a comment. Ping. This is impacting our ability to get clang functioning. Repository: rC Clang https://reviews.llvm.org/D49244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

r344357 - Make YAML quote forward slashes.

2018-10-12 Thread Zachary Turner via cfe-commits
Author: zturner Date: Fri Oct 12 09:24:09 2018 New Revision: 344357 URL: http://llvm.org/viewvc/llvm-project?rev=344357&view=rev Log: Make YAML quote forward slashes. Modified: cfe/trunk/unittests/Tooling/DiagnosticsYamlTest.cpp cfe/trunk/unittests/Tooling/ReplacementsYamlTest.cpp Modifi

  1   2   3   >