[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clangd/FuzzyMatch.cpp:93 + for (int I = PatN; I <= WordN; I++) +Best = std::max(Best, Scores[PatN][I][Match].Score); if (isAwful(Best)) sammccall wrote: > this looks like a behavior change - why? This is a

[PATCH] D44559: [Sema] Wrong width of result of mul operation

2018-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D44559#1044639, @rjmccall wrote: > In https://reviews.llvm.org/D44559#1044186, @avt77 wrote: > > > >> In https://reviews.llvm.org/D44559#1040799, @rjmccall wrote: > > >> > > >>> I think we're correct not to warn here and that GCC/ICC

[clang-tools-extra] r328115 - [clang-tidy] Use :doc: for check links in Release Notes.

2018-03-21 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Wed Mar 21 10:06:13 2018 New Revision: 328115 URL: http://llvm.org/viewvc/llvm-project?rev=328115=rev Log: [clang-tidy] Use :doc: for check links in Release Notes. Differential revision: https://reviews.llvm.org/D44694 Modified:

[PATCH] D44272: [clangd] Support incremental document syncing

2018-03-21 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 139328. simark added a comment. Add lit test case Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44272 Files: clangd/ClangdLSPServer.cpp clangd/DraftStore.cpp clangd/DraftStore.h clangd/Protocol.cpp clangd/Protocol.h

[PATCH] D44559: [Sema] Wrong width of result of mul operation

2018-03-21 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D44559#1044653, @aaron.ballman wrote: > In https://reviews.llvm.org/D44559#1044639, @rjmccall wrote: > > > In https://reviews.llvm.org/D44559#1044186, @avt77 wrote: > > > > > >> In https://reviews.llvm.org/D44559#1040799, @rjmccall wrote: > >

[PATCH] D44755: [analyzer] Suppress more C++17-related crashes.

2018-03-21 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:480 } + CC = dyn_cast( + RTCElem->getConstructionContext()); I'm a bit confused as to what is going on here; maybe a short comment would be helpful?

r328153 - [Modules] Fix creating fake definition data for lambdas.

2018-03-21 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Wed Mar 21 14:28:54 2018 New Revision: 328153 URL: http://llvm.org/viewvc/llvm-project?rev=328153=rev Log: [Modules] Fix creating fake definition data for lambdas. During reading C++ definition data for lambda we can access CXXRecordDecl representing lambda before we

[PATCH] D44747: [AMDGPU] Set calling convention for CUDA kernel

2018-03-21 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D44747#1044916, @yaxunl wrote: > In https://reviews.llvm.org/D44747#1044893, @rjmccall wrote: > > > Is there a reason for this to be done as a special case in IRGen instead of > > just implicitly applying the calling convention in Sema? > >

Re: r327959 - [ms] Parse #pragma optimize and ignore it behind its own flag

2018-03-21 Thread Nico Weber via cfe-commits
Ah! Hm, maybe that's the better group for this anyway? Not sure. On Wed, Mar 21, 2018, 9:03 PM Hans Wennborg wrote: > Aw, rats. I put it under -Wignored-pragmas rather than > -Wunsupported-pragmas, because I was looking at #pragma intrinsic. > > I'll take a look at this again

Re: r327959 - [ms] Parse #pragma optimize and ignore it behind its own flag

2018-03-21 Thread Hans Wennborg via cfe-commits
Not sure either, but I think the ignored warning is used for pragmas that clang fails to parse, so maybe unsupported is better. On Wed, Mar 21, 2018 at 9:33 PM, Nico Weber wrote: > Ah! Hm, maybe that's the better group for this anyway? Not sure. > > On Wed, Mar 21, 2018,

[PATCH] D34331: func.wrap.func.con: Unset function before destroying anything

2018-03-21 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 139369. vsapsai edited the summary of this revision. vsapsai added a comment. - Implement the same functionality for C++98 and C++03. - Use `DoNotOptimize` instead of `asm`. Didn't move the tests as the standard doesn't require assignment operator to be

[PATCH] D34331: func.wrap.func.con: Unset function before destroying anything

2018-03-21 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. A few small comments... Comment at: libcxx/include/functional:1821 { -if ((void *)__f_ == &__buf_) -__f_->destroy(); -else if (__f_) -__f_->destroy_deallocate(); -__f_ = 0; +function::operator=(nullptr); if

[PATCH] D44559: [Sema] Wrong width of result of mul operation

2018-03-21 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D44559#1044186, @avt77 wrote: > >> In https://reviews.llvm.org/D44559#1040799, @rjmccall wrote: > >> > >>> I think we're correct not to warn here and that GCC/ICC are being noisy. > >>> The existence of a temporary promotion to a wider

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 139313. MaskRay added a comment. Update summary Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44720 Files: clangd/FuzzyMatch.cpp clangd/FuzzyMatch.h Index: clangd/FuzzyMatch.h

[PATCH] D44694: [clang-tidy] Use :doc: for check links in Release Notes

2018-03-21 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE328115: [clang-tidy] Use :doc: for check links in Release Notes. (authored by eugenezelenko, committed by ). Changed prior to commit: https://reviews.llvm.org/D44694?vs=139167=139320#toc Repository:

[PATCH] D44743: [clang-tidy] Marking hicpp-no-assembler-msvc unsupported on Windows

2018-03-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D44743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44589: [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots.

2018-03-21 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Hi Volodymyr, thanks for working on this! Overall this looks good, I just have a few nits. Comment at: clang/include/clang/Basic/SourceLocation.h:202 +/// Can be used transparently in places where SourceLocation is expected. +class

[clang-tools-extra] r328131 - Reland "[lit] Adding config initialization to lit tests in clang-tools-extra"

2018-03-21 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Wed Mar 21 11:50:26 2018 New Revision: 328131 URL: http://llvm.org/viewvc/llvm-project?rev=328131=rev Log: Reland "[lit] Adding config initialization to lit tests in clang-tools-extra" Adding the config initialization to clang-tools-extra so that tests that use

[PATCH] D43047: [Builtins] Overload __builtin_operator_new/delete to allow forwarding to usual allocation/deallocation functions.

2018-03-21 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 139347. EricWF marked an inline comment as done. EricWF added a comment. - Merge with upstream. - Add requested assertion. https://reviews.llvm.org/D43047 Files: include/clang/Basic/Builtins.def include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D43047: [Builtins] Overload __builtin_operator_new/delete to allow forwarding to usual allocation/deallocation functions.

2018-03-21 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:3458 + } + TheCall->getCallee()->setType(OperatorNewOrDelete->getType()); + rsmith wrote: > It would be nice to assert that the callee you're setting the type of is an > ImplicitCastExpr doing

[PATCH] D44747: [AMDGPU] Set calling convention for CUDA kernel

2018-03-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 139359. yaxunl added a comment. Upload diff with full context. https://reviews.llvm.org/D44747 Files: lib/CodeGen/CodeGenModule.cpp test/CodeGenCUDA/kernel-amdgcn.cu Index: test/CodeGenCUDA/kernel-amdgcn.cu

[PATCH] D44634: [clang-format] Detect Objective-C for #import

2018-03-21 Thread Yan Zhang via Phabricator via cfe-commits
Wizard added a comment. Why do we only detect system framework? I think any #import could indicate ObjC header. Repository: rC Clang https://reviews.llvm.org/D44634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40218: [Clang] Add __builtin_launder

2018-03-21 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked an inline comment as done. EricWF added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:1947-1948 +const auto *Record = ArgTy->getAsCXXRecordDecl(); +if (CGM.getCodeGenOpts().StrictVTablePointers && Record && +Record->isDynamicClass()) +

[PATCH] D40218: [Clang] Add __builtin_launder

2018-03-21 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF marked 2 inline comments as done. EricWF added inline comments. Comment at: test/CodeGenCXX/builtin-launder.cpp:93-96 +/// The test cases in this namespace technically need to be laundered according +/// to the language in the standard (ie they have const or reference

[clang-tools-extra] r328150 - [clang-doc] Reland "[clang-doc] Setup clang-doc frontend framework"

2018-03-21 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Wed Mar 21 14:21:45 2018 New Revision: 328150 URL: http://llvm.org/viewvc/llvm-project?rev=328150=rev Log: [clang-doc] Reland "[clang-doc] Setup clang-doc frontend framework" Fixing the the failing Windows tests. Added:

[PATCH] D44753: [Preprocessor] Rename __is_{target -> host}_* function-like builtin macros

2018-03-21 Thread John Ericson via Phabricator via cfe-commits
Ericson2314 added a comment. One that that might make my position clearer is to substitute the name "build", "host", and "target" for "build", "run", and "emit". [A colleague of mine proposed these alternative names and I do think they are vastly more human friendly.] Then if we write int

[PATCH] D44272: [clangd] Support incremental document syncing

2018-03-21 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 139355. simark marked an inline comment as done. simark added a comment. Address review comments I failed to address previously Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44272 Files: clangd/ClangdLSPServer.cpp clangd/DraftStore.cpp

[PATCH] D44747: [AMDGPU] Set calling convention for CUDA kernel

2018-03-21 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Is there a reason for this to be done as a special case in IRGen instead of just implicitly applying the calling convention in Sema? https://reviews.llvm.org/D44747 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40218: [Clang] Add __builtin_launder

2018-03-21 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 139363. EricWF marked an inline comment as done. EricWF added a comment. - Launder types with subobjects of dynamic class type. - Improve diagnostic selection using `llvm::Optional`. - Add comment about LTO ABI concerns to test file. - Merge with master.

[clang-tools-extra] r328149 - [clangd][nfc] Correct header name in comment

2018-03-21 Thread Jan Korous via cfe-commits
Author: jkorous Date: Wed Mar 21 14:04:10 2018 New Revision: 328149 URL: http://llvm.org/viewvc/llvm-project?rev=328149=rev Log: [clangd][nfc] Correct header name in comment Modified: clang-tools-extra/trunk/clangd/index/Index.h Modified: clang-tools-extra/trunk/clangd/index/Index.h URL:

[PATCH] D44710: Set dso_local on builtin functions

2018-03-21 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm https://reviews.llvm.org/D44710 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r328158 - [NVPTX] Make tensor shape part of WMMA intrinsic's name.

2018-03-21 Thread Artem Belevich via cfe-commits
Author: tra Date: Wed Mar 21 14:55:02 2018 New Revision: 328158 URL: http://llvm.org/viewvc/llvm-project?rev=328158=rev Log: [NVPTX] Make tensor shape part of WMMA intrinsic's name. This is needed for the upcoming implementation of the new 8x32x16 and 32x8x16 variants of WMMA instructions

[PATCH] D44753: [Preprocessor] Rename __is_{target -> host}_* function-like builtin macros

2018-03-21 Thread John Ericson via Phabricator via cfe-commits
Ericson2314 created this revision. Ericson2314 added reviewers: arphaman, compnerd, dexonsmith, bob.wilson, steven_wu. Herald added subscribers: cfe-commits, javed.absar. Per my belated [reply] to the mailing list, I believe the "target" nomenclature incorrect for cross compilation. [reply]:

Re: r327959 - [ms] Parse #pragma optimize and ignore it behind its own flag

2018-03-21 Thread Hans Wennborg via cfe-commits
Aw, rats. I put it under -Wignored-pragmas rather than -Wunsupported-pragmas, because I was looking at #pragma intrinsic. I'll take a look at this again tomorrow. On Wed, Mar 21, 2018 at 5:18 PM, Nico Weber via cfe-commits wrote: > From the bot changes, it seems that

[PATCH] D44747: [AMDGPU] Set calling convention for CUDA kernel

2018-03-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D44747#1044893, @rjmccall wrote: > Is there a reason for this to be done as a special case in IRGen instead of > just implicitly applying the calling convention in Sema? The calling convention is not used in Sema, therefore it seems simpler

[PATCH] D44753: [Preprocessor] Rename __is_{target -> host}_* function-like builtin macros

2018-03-21 Thread Bob Wilson via Phabricator via cfe-commits
bob.wilson added a comment. Sorry that I missed your earlier comment about this. The confusion could only arise in the context of a tool (like a compiler) that is being used for cross-compilation. That is a small fraction of the audience for Clang, and we should design this in a way that makes

[PATCH] D44755: [analyzer] Suppress more C++17-related crashes.

2018-03-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added subscribers: cfe-commits, rnkovacs. This is assertion removal. The assertion was saying that a function's return value is always a temporary object - which is not true when

Re: [PATCH] D44634: [clang-format] Detect Objective-C for #import

2018-03-21 Thread Ben Hamilton via cfe-commits
#import is perfectly legal in C and C++, it's just not commonly used. On Wed, Mar 21, 2018, 14:27 Yan Zhang via Phabricator < revi...@reviews.llvm.org> wrote: > Wizard added a comment. > > Why do we only detect system framework? I think any #import could indicate > ObjC header. > > > Repository:

[PATCH] D44645: [test] Fix Cross-DSO CFI Android sanitizer test for -rtlib=compiler-rt

2018-03-21 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a comment. This was fixed in https://reviews.llvm.org/D44655 https://reviews.llvm.org/D44645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44634: [clang-format] Detect Objective-C for #import

2018-03-21 Thread Yan Zhang via Phabricator via cfe-commits
Wizard added a comment. For some ObjC headers it uses #import to import other headers instead of system framework, so I think we should also detect #import "*.h" as well. The only usage of #import in C++ is to import type library, which won't have suffix of ".h". Repository: rC Clang

[PATCH] D44753: [Preprocessor] Rename __is_{target -> host}_* function-like builtin macros

2018-03-21 Thread John Ericson via Phabricator via cfe-commits
Ericson2314 added a comment. In https://reviews.llvm.org/D44753#1044935, @bob.wilson wrote: > Sorry that I missed your earlier comment about this. The confusion could only > arise in the context of a tool (like a compiler) that is being used for > cross-compilation. That is a small fraction of

[PATCH] D44753: [Preprocessor] Rename __is_{target -> host}_* function-like builtin macros

2018-03-21 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. I disagree. I think "target" is the correct name, even for cross compiling. For something compiled with -target foo, we are consistent calling it "target" during compile time. It only becomes appropriate to call it "host" during the runtime of the executable. There

[PATCH] D43494: [Modules] Fix creating fake definition data for lambdas.

2018-03-21 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328153: [Modules] Fix creating fake definition data for lambdas. (authored by vsapsai, committed by ). Changed prior to commit: https://reviews.llvm.org/D43494?vs=138059=139372#toc Repository: rC

[PATCH] D44753: [Preprocessor] Rename __is_{target -> host}_* function-like builtin macros

2018-03-21 Thread John Ericson via Phabricator via cfe-commits
Ericson2314 added a comment. @steven_wu but what you say is directly contradicted by the GHC example. I'm sure I could fine a GCC example too where some macro with "target" is in the name affects the target of the compiler being built. In the vast majority of programs, no more than one

[PATCH] D44753: [Preprocessor] Rename __is_{target -> host}_* function-like builtin macros

2018-03-21 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. It is not about matching command line name to builtin marco name. "target" is the platform we are compiling for, whether it is host or device or something else. It is a different concept when you talking about cross-compiling, which "target" is strictly not host and

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 139314. MaskRay edited the summary of this revision. MaskRay added a comment. Update summary Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44720 Files: clangd/FuzzyMatch.cpp clangd/FuzzyMatch.h Index: clangd/FuzzyMatch.h

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clangd/FuzzyMatch.h:61 bool allowMatch(int P, int W) const; - int skipPenalty(int W, Action Last) const; - int matchBonus(int P, int W, Action Last) const; + int missScore(int W, Action Last) const; + int matchScore(int P, int W,

[clang-tools-extra] r328127 - [clang-tidy] Marking hicpp-no-assembler-msvc unsupported on Windows

2018-03-21 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Wed Mar 21 11:03:41 2018 New Revision: 328127 URL: http://llvm.org/viewvc/llvm-project?rev=328127=rev Log: [clang-tidy] Marking hicpp-no-assembler-msvc unsupported on Windows After changes to lit.site.cfg.in, the test is now running (and failing) on windows, so

[PATCH] D44602: [clang-tidy] readability-function-size: add VariableThreshold param.

2018-03-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/clang-tidy/readability-function-size.cpp:207-212 +void variables_8() { + int a, b; + struct A { +A(int c, int d); + }; +} aaron.ballman wrote: > lebedev.ri wrote: > > aaron.ballman wrote: > > > lebedev.ri

[PATCH] D43047: [Builtins] Overload __builtin_operator_new/delete to allow forwarding to usual allocation/deallocation functions.

2018-03-21 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328134: [Builtins] Overload __builtin_operator_new/delete to allow forwarding to usual… (authored by EricWF, committed by ). Repository: rC Clang https://reviews.llvm.org/D43047 Files:

[PATCH] D43047: [Builtins] Overload __builtin_operator_new/delete to allow forwarding to usual allocation/deallocation functions.

2018-03-21 Thread Eric Fiselier via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328134: [Builtins] Overload __builtin_operator_new/delete to allow forwarding to usual… (authored by EricWF, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D44533: [AMDGPU] Fix codegen for inline assembly

2018-03-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Ping https://reviews.llvm.org/D44533 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44541: [OpenMP][Clang] Move device global stack init before master-workers split

2018-03-21 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea abandoned this revision. gtbercea added a comment. This leads to usage of statically allocated shared data before their initialization in runtime structures by master thread in kernel_init() function. New patch available with worker and master-side initialization. Repository: rC

[PATCH] D44749: [OpenMP][Clang] Add call to global data sharing stack initialization on the workers side

2018-03-21 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. gtbercea added reviewers: ABataev, grokos, carlo.bertolli, caomhin. Herald added subscribers: cfe-commits, guansong, jholewinski. The workers also need to initialize the global stack. The call to the initialization function needs to happen after the kernel_init()

[PATCH] D44272: [clangd] Support incremental document syncing

2018-03-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: unittests/clangd/DraftStoreTests.cpp:27 + +static int rangeLength(StringRef Code, const Range ) { + size_t Start = positionToOffset(Code, Rng.start); ilya-biryukov wrote: > no need for `static`, since function is

[PATCH] D44743: [clang-tidy] Marking hicpp-no-assembler-msvc unsupported on Windows

2018-03-21 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett created this revision. juliehockett added reviewers: zturner, phosek. juliehockett added a project: clang-tools-extra. Herald added a subscriber: xazax.hun. After changes to lit.site.cfg.in, the test is now running (and failing) on windows, so temporarily marking it unsupported. See

[PATCH] D44743: [clang-tidy] Marking hicpp-no-assembler-msvc unsupported on Windows

2018-03-21 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett closed this revision. juliehockett added a comment. Committed in r328127. https://reviews.llvm.org/D44743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r328134 - [Builtins] Overload __builtin_operator_new/delete to allow forwarding to usual allocation/deallocation functions.

2018-03-21 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Wed Mar 21 12:19:48 2018 New Revision: 328134 URL: http://llvm.org/viewvc/llvm-project?rev=328134=rev Log: [Builtins] Overload __builtin_operator_new/delete to allow forwarding to usual allocation/deallocation functions. Summary: Libc++'s default allocator uses

[PATCH] D44272: [clangd] Support incremental document syncing

2018-03-21 Thread Simon Marchi via Phabricator via cfe-commits
simark updated this revision to Diff 139321. simark added a comment. Remove draft if update fails Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44272 Files: clangd/ClangdLSPServer.cpp clangd/DraftStore.cpp clangd/DraftStore.h clangd/Protocol.cpp clangd/Protocol.h

[PATCH] D43737: Improve -Winfinite-recursion

2018-03-21 Thread Robert Widmann via Phabricator via cfe-commits
CodaFi updated this revision to Diff 139325. https://reviews.llvm.org/D43737 Files: lib/Sema/AnalysisBasedWarnings.cpp test/SemaCXX/warn-infinite-recursion.cpp Index: test/SemaCXX/warn-infinite-recursion.cpp === ---

[PATCH] D44745: [HWASan] Port HWASan to Linux x86-64 (clang)

2018-03-21 Thread Aleksey Shlyapnikov via Phabricator via cfe-commits
alekseyshl created this revision. alekseyshl added a reviewer: eugenis. Herald added a subscriber: cryptoad. Porting HWASan to Linux x86-64, the third of the three patches, clang part. Repository: rC Clang https://reviews.llvm.org/D44745 Files: lib/Driver/SanitizerArgs.cpp

[PATCH] D44747: [AMDGPU] Set calling convention for CUDA kernel

2018-03-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: rjmccall, arsenm. Herald added subscribers: t-tye, tpr, dstuttard, wdng, kzhuravl. This patch sets the calling convention for CUDA kernels required by AMDGPU target. Patch by Greg Rodgers. Lit test added by Yaxun Liu.

[PATCH] D42730: [clang-tidy]] Add check for use of types/classes/functions from header which are deprecated and removed in C++17

2018-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54 + } else if (const auto *const Call = + Result.Nodes.getNodeAs("ptr_fun_call")) { +diag(Call->getLocStart(), Message) << "'std::ptr_fun'"; + } else if

[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-03-21 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Sorry I've let this lie fallow for so long. Comment at: include/charconv:234 +to_chars(char* __first, char* __last, _Tp __value, int __base) +-> to_chars_result +{ Why use the trailing return type here? I don't see any

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clangd/FuzzyMatch.h:61 bool allowMatch(int P, int W) const; - int skipPenalty(int W, Action Last) const; - int matchBonus(int P, int W, Action Last) const; + int missScore(int W, Action Last) const; + int matchScore(int P, int W,

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clangd/FuzzyMatch.cpp:96 return None; return ScoreScale * std::min(PerfectBonus * PatN, std::max(0, Best)); } I also don't understand why it clamps the value to zero here. Negative values are also meaningful

[PATCH] D42730: [clang-tidy]] Add check for use of types/classes/functions from header which are deprecated and removed in C++17

2018-03-21 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/modernize/DeprecatedFunctionalCheck.cpp:48-54 + } else if (const auto *const Call = + Result.Nodes.getNodeAs("ptr_fun_call")) { +diag(Call->getLocStart(), Message) << "'std::ptr_fun'"; + } else if (const

[PATCH] D44272: [clangd] Support incremental document syncing

2018-03-21 Thread Simon Marchi via Phabricator via cfe-commits
simark marked 6 inline comments as done. simark added inline comments. Herald added a subscriber: MaskRay. Comment at: unittests/clangd/DraftStoreTests.cpp:27 + +static int rangeLength(StringRef Code, const Range ) { + size_t Start = positionToOffset(Code, Rng.start);

[PATCH] D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check.

2018-03-21 Thread Clement Courbet via Phabricator via cfe-commits
courbet added inline comments. Comment at: clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp:26 + binaryOperator( + anyOf(hasOperatorName("+="), hasOperatorName("-=")), + hasLHS(hasType(isInteger())), aaron.ballman wrote: >

[PATCH] D44729: [ASTMatchers] Add hasSubExpr() matcher.

2018-03-21 Thread Clement Courbet via Phabricator via cfe-commits
courbet created this revision. courbet added reviewers: aaron.ballman, alexfh. Herald added a subscriber: klimek. This is needed to implement more checks in https://reviews.llvm.org/D38455. Repository: rC Clang https://reviews.llvm.org/D44729 Files: docs/LibASTMatchersReference.html

r328087 - [ASTMatchers] Remove extra qualifier for consistency (LibASTMatchersReference.html)

2018-03-21 Thread Clement Courbet via cfe-commits
Author: courbet Date: Wed Mar 21 03:54:29 2018 New Revision: 328087 URL: http://llvm.org/viewvc/llvm-project?rev=328087=rev Log: [ASTMatchers] Remove extra qualifier for consistency (LibASTMatchersReference.html) + Regenerate doc. Modified: cfe/trunk/docs/LibASTMatchersReference.html

[PATCH] D41808: Rename clang link from clang-X.Y to clang-X

2018-03-21 Thread Dimitry Andric via Phabricator via cfe-commits
dim accepted this revision. dim added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D41808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44559: [Sema] Wrong width of result of mul operation

2018-03-21 Thread Andrew V. Tischenko via Phabricator via cfe-commits
avt77 updated this revision to Diff 139271. avt77 added a comment. I removed the dependence on arch and updated the tests. https://reviews.llvm.org/D44559 Files: lib/Sema/SemaChecking.cpp test/Sema/conversion.c test/SemaCXX/conversion.cpp Index: test/SemaCXX/conversion.cpp

r328086 - [ASTMatchers] Regenerate doc.

2018-03-21 Thread Clement Courbet via cfe-commits
Author: courbet Date: Wed Mar 21 03:48:00 2018 New Revision: 328086 URL: http://llvm.org/viewvc/llvm-project?rev=328086=rev Log: [ASTMatchers] Regenerate doc. Modified: cfe/trunk/docs/LibASTMatchersReference.html Modified: cfe/trunk/docs/LibASTMatchersReference.html URL:

[PATCH] D44189: [RISCV] Verify the input value of -march=

2018-03-21 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng updated this revision to Diff 139256. kito-cheng added a comment. Update revision according Alex's review. Changes: - Add testcase for uppercase of -march string. - Add testcase for repeated letter in -march. - Add more comment. - Add several TODO item for diagnostic message

[PATCH] D44189: [RISCV] Verify the input value of -march=

2018-03-21 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng marked 4 inline comments as done. kito-cheng added a comment. Hi Alex: Thanks for your input, check for repeated letter was missed in my last patch :) Comment at: lib/Driver/ToolChains/Arch/RISCV.cpp:34 + +// The canonical order specified in ISA manual. +

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. (Sorry if I sound gruff - I'm sure there are improvements to be had here. But since the code is a bit dense (my fault) I have trouble inferring them from the deltas. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44720

[PATCH] D44559: [Sema] Wrong width of result of mul operation

2018-03-21 Thread Andrew V. Tischenko via Phabricator via cfe-commits
avt77 added a comment. >> In https://reviews.llvm.org/D44559#1040799, @rjmccall wrote: >> >>> I think we're correct not to warn here and that GCC/ICC are being noisy. >>> The existence of a temporary promotion to a wider type doesn't justify >>> warning on arithmetic between two operands that

Re: [clang-tools-extra] r328069 - Revert "[lit] Adding config initialization to lit tests in clang-tools-extra"

2018-03-21 Thread Roman Lebedev via cfe-commits
On Wed, Mar 21, 2018 at 5:28 AM, Petr Hosek via cfe-commits wrote: > Author: phosek > Date: Tue Mar 20 19:28:22 2018 > New Revision: 328069 > > URL: http://llvm.org/viewvc/llvm-project?rev=328069=rev > Log: > Revert "[lit] Adding config initialization to lit tests in

[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.

2018-03-21 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Can you elaborate on what this patch is improving, and how? There are some stylistic changes, and also what look like subtle logic changes, and some rearrangement of the algorithm - to what end? Canonical way to run all tests is `ninja check-clang-tools`, the way you

[PATCH] D41537: Optionally add code completion results for arrow instead of dot

2018-03-21 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added inline comments. Comment at: include/clang/Sema/CodeCompleteConsumer.h:565 + /// \brief For this completion result correction is required. + Optional Corr = None; + ilya-biryukov wrote: > Having a string replacement without an actual range to

[PATCH] D44724: [Fuchsia] Don't install libc++, libc++abi or libunwind on Darwin

2018-03-21 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. Lgtm with some more comments Repository: rC Clang https://reviews.llvm.org/D44724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44426: Fix llvm + clang build with Intel compiler

2018-03-21 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. In https://reviews.llvm.org/D44426#1042162, @mibintc wrote: > I added some inline comments. You are using the Intel 18.0 compiler on > Windows - what version of Visual Studio is in the environment? Yes, I'm using 18.0 Comment at:

r328092 - clang-interpreter example cmake fix

2018-03-21 Thread Luke Cheeseman via cfe-commits
Author: lukecheeseman Date: Wed Mar 21 05:05:19 2018 New Revision: 328092 URL: http://llvm.org/viewvc/llvm-project?rev=328092=rev Log: clang-interpreter example cmake fix Add in a space when appending the export to the linker options. Without the space the export is appended onto whatever the

[PATCH] D44673: Make positionToOffset return llvm::Expected

2018-03-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM. See the empty line NITS, though. Comment at: clangd/ClangdServer.cpp:199 +return End.takeError(); + + return formatCode(Code, File,

[PATCH] D44632: [clang-format] Add a few more Core Graphics identifiers to ObjC heuristic

2018-03-21 Thread Jacek Olesiak via Phabricator via cfe-commits
jolesiak added inline comments. Comment at: lib/Format/Format.cpp:1450 // Keep this array sorted, since we are binary searching over it. static constexpr llvm::StringLiteral FoundationIdentifiers[] = { "CGFloat", krasimir wrote: > jolesiak

[PATCH] D43957: Fixing issue where a space was not added before a global namespace variable when SpacesInParentheses is set

2018-03-21 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Please generally upload diffs with the full file as context so that Phabricator can properly expand the context where necessary. This looks good, though. Repository: rC Clang

[PATCH] D44555: clang-interpreter example cmake fix

2018-03-21 Thread Luke Cheeseman via Phabricator via cfe-commits
LukeCheeseman closed this revision. LukeCheeseman added a comment. closed by https://reviews.llvm.org/rC328092 Repository: rC Clang https://reviews.llvm.org/D44555 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44673: Make positionToOffset return llvm::Expected

2018-03-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/SourceCode.h:41 /// Turn an offset in Code into a [line, column] pair. Position offsetToPosition(llvm::StringRef Code, size_t Offset); We should be consistent for all functions inside this fail. They

[PATCH] D44589: [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots.

2018-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This generally looks reasonable to me, but @rsmith should weigh in before you commit because `MultiSourceLocation` is novel. https://reviews.llvm.org/D44589 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44729: [ASTMatchers] Add hasSubExpr() matcher.

2018-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I think `hasSourceExpression()` already does what you're looking for. void f() { int i = 1.0f; } clang-query> match implicitCastExpr(hasSourceExpression(floatLiteral())) Match #1: C:\Users\aballman.GRAMMATECH\Desktop\test.c:2:11: note: "root" binds here

[PATCH] D43967: [ASTImporter] Add test helper Fixture

2018-03-21 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hi Gabor! This looks much better. Comment at: unittests/AST/ASTImporterTest.cpp:1000 + R"( + template + struct X {}; In C++, names started with underscore are reserved for implementation so it's undesirable to use

[PATCH] D44732: [clangd] Set CLANGD_EDITOR environment variable in vscode extension.

2018-03-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: ioeric, jkorous-apple, ilya-biryukov, klimek. This would allow us to log the editor using custom-built clangd. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44732 Files:

[PATCH] D44753: [Preprocessor] Rename __is_{target -> host}_* function-like builtin macros

2018-03-21 Thread John Ericson via Phabricator via cfe-commits
Ericson2314 added a comment. > I'm sure I could fine a GCC example FWIW https://github.com/gcc-mirror/gcc/blob/master/gcc/config/aarch64/aarch64.c vs https://github.com/gcc-mirror/gcc/blob/master/gcc/common/config/aarch64/aarch64-common.c @steven_wu > It is not about matching command line

r328166 - Fix for LLVM change (Transforms/Utils/Local.h -> Analysis/Utils/Local.h)

2018-03-21 Thread David Blaikie via cfe-commits
Author: dblaikie Date: Wed Mar 21 15:34:27 2018 New Revision: 328166 URL: http://llvm.org/viewvc/llvm-project?rev=328166=rev Log: Fix for LLVM change (Transforms/Utils/Local.h -> Analysis/Utils/Local.h) Modified: cfe/trunk/lib/CodeGen/CGCall.cpp Modified: cfe/trunk/lib/CodeGen/CGCall.cpp

[PATCH] D34331: func.wrap.func.con: Unset function before destroying anything

2018-03-21 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: libcxx/include/functional:1722-1733 if (__f.__f_ == 0) __f_ = 0; else if ((void *)__f.__f_ == &__f.__buf_) { __f_ = __as_base(&__buf_); __f.__f_->__clone(__f_); } Here is

[PATCH] D44725: [analyzer] NFC: Move construction context allocation into a helper method.

2018-03-21 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. This revision is now accepted and ready to land. LGTM, but would actually make even more sense as a static function for the allocator. E.g. we have `llvm::make_shared<>()`, so we could also have

[PATCH] D44763: [analyzer] Add C++17-specific constructor-initializer construction contexts.

2018-03-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added subscribers: cfe-commits, rnkovacs. `CXXCtorInitializer`-based constructors are apparently also affected by the C++17 mandatory copy elision, like variable constructors and

[PATCH] D44764: [clangd] Move GTest printers to separate file

2018-03-21 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle created this revision. Herald added subscribers: cfe-commits, MaskRay, ioeric, jkorous-apple, ilya-biryukov, klimek. This mitigates a possible issue in tests that print objects on failure. It is possible that there will be two different instantiations of the printer template for a

[PATCH] D44765: PR36643 Make clang-format support more generic TMarcos

2018-03-21 Thread Teodor Petrov via Phabricator via cfe-commits
obfuscated created this revision. obfuscated added a reviewer: krasimir. Herald added a subscriber: klimek. This patch changes the check for _T to detect TMarcos with a more generic check. This makes it possible to format wxWidgets projects (where wxT is used a lot) correctly. Patch by Teodor

  1   2   >