[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-10-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/AST/Expr.cpp:1609 case CK_AddressSpaceConversion: -assert(getType()->isPointerType() || getType()->isBlockPointerType()); -assert(getSubExpr()->getType()->isPointerType() || -

[PATCH] D52615: Handle -fsanitize-address-poison-class-member-array-new-cookie in the driver and propagate it to cc1

2018-10-26 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab added a comment. In https://reviews.llvm.org/D52615#1276938, @rjmccall wrote: > In https://reviews.llvm.org/D52615#1275946, @filcab wrote: > > > In https://reviews.llvm.org/D52615#1272725, @rjmccall wrote: > > > > > In https://reviews.llvm.org/D52615#1266320, @filcab wrote: > > > > > > >

[PATCH] D52670: [clang-tidy] Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)

2018-10-26 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL345381: [clang-tidy] Re-commit: Add new readability-uppercase-literal-suffix check… (authored by lebedevri, committed by ). Changed prior to commit:

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

2018-10-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/ConstValueReturnCheck.cpp:107 +diag(Def->getInnerLocStart(), "return type %0 is 'const'-qualified " + "hindering compiler optimizations") +<<

[PATCH] D53717: [AST] Only store the needed data in ForStmt.

2018-10-26 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In https://reviews.llvm.org/D53717#1276388, @rsmith wrote: > In https://reviews.llvm.org/D53717#1276245, @rsmith wrote: > > > Do you have evidence that this complexity is worthwhile? (I wouldn't > > imagine we have very many `ForStmt`s per translation unit, so saving

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

2018-10-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Comment at: test/SemaOpenCL/extension-begin.cl:43 g(0); // expected-error {{no matching function for call to 'g'}} -// expected-note@-26

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-10-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: rjmccall, yaxunl. I first enabled AS deduction for references that allowed to inherit the right conversion diagnostics based on qualification conversion rules implemented earlier for the pointer type. Then in order to tests the

[PATCH] D44100: [ASTImporter] Reorder fields after structure import is finished

2018-10-26 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Ping. This is still not committed, however, essential for ctu analyse any C++ project. Aleksei, I am happy to commit it for you if you don't have time, just let me know. Repository: rC Clang https://reviews.llvm.org/D44100

[PATCH] D53023: Prototype OpenCL BIFs using Tablegen

2018-10-26 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic added inline comments. Comment at: lib/Sema/SemaExpr.cpp:2247 if (R.empty() && HasTrailingLParen && II && !getLangOpts().CPlusPlus) { -NamedDecl *D = ImplicitlyDefineFunction(NameLoc, *II, S); -if (D) R.addDecl(D); +if (getLangOpts().OpenCL) { + auto

[PATCH] D52670: [clang-tidy] Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)

2018-10-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Rerun on clang-tools-extra+lld+clang codebase, nothing broken. I'm gonna reland. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r345380 - Revert r345330 "Add MS ABI mangling for operator<=>."

2018-10-26 Thread Hans Wennborg via cfe-commits
Author: hans Date: Fri Oct 26 06:05:45 2018 New Revision: 345380 URL: http://llvm.org/viewvc/llvm-project?rev=345380=rev Log: Revert r345330 "Add MS ABI mangling for operator<=>." The generated MS manglings differ between 32- and 64-bit, and the test only expects the latter. See also the commit

[PATCH] D53693: [ASTImporter] Typedef import brings in the complete type

2018-10-26 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added a comment. Hi Gabor, Thank you for the patch. I looks reasonable but I have some questions. Comment at: lib/AST/ASTImporter.cpp:2310 +D->getUnderlyingType(), FoundTypedef->getUnderlyingType())) { + QualType FromUT =

Re: r345330 - Add MS ABI mangling for operator<=>.

2018-10-26 Thread Hans Wennborg via cfe-commits
It seems the generated MS mangling differs between 32- and 64-bit, and the test expects the latter. Let's revert in the meantime.. r345380 On Fri, Oct 26, 2018 at 1:10 PM, Peter Smith via cfe-commits wrote: > This commit, specifically the changes made to >

[PATCH] D53755: [ASTImporter] Remove import of definition from GetAlreadyImportedOrNull

2018-10-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: lib/AST/ASTImporter.cpp:7716 } } This can be simplified by removing brace characters and removing `ToD`. Repository: rC Clang https://reviews.llvm.org/D53755

[PATCH] D53448: [OpenMP][NVPTX] Use single loops when generating code for distribute parallel for

2018-10-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG, with a nit Comment at: lib/Sema/SemaOpenMP.cpp:5308 + +// Build IV <= PrevEUB to be used in parallel for is in combination with +// a distribute directive with

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

2018-10-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! Comment at: test/SemaOpenCL/intel-subgroup-avc-ext-types.cl:5 + +// All intel_sub_group_avc_* types can only be used as argument or return value +// of

[PATCH] D53443: [OpenMP][NVPTX] Enable default scheduling for parallel for in non-SPMD cases.

2018-10-26 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 171310. gtbercea added a comment. Add test. Repository: rC Clang https://reviews.llvm.org/D53443 Files: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp test/OpenMP/nvptx_parallel_for_codegen.cpp Index: test/OpenMP/nvptx_parallel_for_codegen.cpp

[PATCH] D53754: [Analyzer] Skip symbolic regions based on conjured symbols in comparison of the containers of iterators

2018-10-26 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added a reviewer: NoQ. baloghadamsoftware added a project: clang. Herald added subscribers: donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, whisperity. Herald added a reviewer: george.karpenkov. Checking whether

[PATCH] D53757: [ASTImporter] Changed use of Import to Import_New in ASTNodeImporter.

2018-10-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, Szelethus, martong, dkrupp. Herald added a reviewer: a.sidorin. Herald added a reviewer: a.sidorin. Repository: rC Clang https://reviews.llvm.org/D53757 Files: lib/AST/ASTImporter.cpp Index: lib/AST/ASTImporter.cpp

[PATCH] D53754: [Analyzer] Skip symbolic regions based on conjured symbols in comparison of the containers of iterators

2018-10-26 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. I wonder whether a method in `MemRegion` called `isSameRegion` or `isSurelySameRegion` would be better. I think it's likely that there are (or will be) checkers that would do similar things. Maybe something like this? bool MemRegion::isSurelySameRegion(const

[clang-tools-extra] r345381 - [clang-tidy] Re-commit: Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)

2018-10-26 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Fri Oct 26 06:09:27 2018 New Revision: 345381 URL: http://llvm.org/viewvc/llvm-project?rev=345381=rev Log: [clang-tidy] Re-commit: Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4) Summary: Detects when the

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

2018-10-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/clang-tidy/readability-isolate-declaration.cpp:233 + int member1, member2; + // TODO: Transform FieldDecl's as well +}; Comment is misleading. Transform == fixit, at least for me. But they are not even

[PATCH] D53763: [libc++] [test] Fix logic error in tests; enable for MSVC previews

2018-10-26 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter created this revision. CaseyCarter added reviewers: EricWF, mclow.lists. Fairly straightforward: these tests were written without an implementation of `<=>`, and they're incorrectly testing that `0 <=> foo` has the behavior that is required for `foo <=> 0`.

r345344 - [AArch64] Implement FP16FML intrinsics

2018-10-26 Thread Bryan Chan via cfe-commits
Author: bryanpkc Date: Thu Oct 25 16:47:00 2018 New Revision: 345344 URL: http://llvm.org/viewvc/llvm-project?rev=345344=rev Log: [AArch64] Implement FP16FML intrinsics Generate the FP16FML intrinsics into arm_neon.h (AArch64 only for now). Add two new type modifiers to NeonEmitter to handle the

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

2018-10-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/readability/ConstValueReturnCheck.cpp:54 + +namespace { + Extend the namespace /\ above, so that function is also covered? Comment at:

[PATCH] D52742: [analyzer][PlistMacroExpansion] Part 1.: New expand-macros flag

2018-10-26 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus planned changes to this revision. Szelethus added a comment. @xazax.hun observed that the way `diagnostics` looks like is this: diagnostics report 1 notes macro_expansions path executed_lines report 2 ... Bt, if I didn't insist on this

[PATCH] D53443: [OpenMP][NVPTX] Enable default scheduling for parallel for in non-SPMD cases.

2018-10-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: test/OpenMP/nvptx_parallel_for_codegen.cpp:44 +// CHECK: call void @__kmpc_kernel_prepare_parallel( +// CHECK: call void @__kmpc_begin_sharing_variables(i8*** %shared_arg_refs, i64 2) +// CHECK: call void @llvm.nvvm.barrier0()

[PATCH] D53755: [ASTImporter] Remove import of definition from GetAlreadyImportedOrNull

2018-10-26 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. This is about to make `GetAlreadyImportedOrNull` to be a const function, as it should be naturally. This is a query function which should not initiate other imports. Repository: rC Clang https://reviews.llvm.org/D53755

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

2018-10-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Thanks! What's the next step in the process? Does someone need to approve this change? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53025 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2018-10-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/readability/ConstValueReturnCheck.cpp:54 + +namespace { + lebedev.ri wrote: > Extend the namespace /\ above, so that function is also covered? Anonymous namespaces are only for class/struct

[PATCH] D53023: Prototype OpenCL BIFs using Tablegen

2018-10-26 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic added a comment. > TODO > Measure the performance / size impact I looks like the total size of OpenCLBuiltinDecl table should be ~450KB (for ~15000 functions). I guess it can be reduced furthermore by: 1. Replacing return type with an index (you've mentioned this in TODO). 2. Replace

[PATCH] D53755: [ASTImporter] Remove import of definition from GetAlreadyImportedOrNull

2018-10-26 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. Herald added subscribers: cfe-commits, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. a_sidorin Repository: rC Clang https://reviews.llvm.org/D53755 Files: include/clang/AST/ASTImporter.h lib/AST/ASTImporter.cpp

[PATCH] D53621: Support for groups of attributes in #pragma clang attribute

2018-10-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from some small nits. Comment at: clang/docs/LanguageExtensions.rst:2666 - #pragma clang attribute push(__attribute__((annotate("custom"))),

[PATCH] D53457: clang-cl: Add "/clang:" pass-through arg support.

2018-10-26 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. One note about flag ordering: the /clang: flags are concatenated to the end of the argument list, so in cases where the last flag wins, the /clang: flags will be chosen regardless of their order relative to other flags on the driver command line. This seems a little

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

2018-10-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Mostly minor nits that clean up wording and comments. Comment at: clang-tidy/readability/IsolateDeclarationCheck.cpp:52 + const LangOptions ) { + assert(Indirections >= 0 && "Indirections must be

[PATCH] D53768: Add VerboseOutputStream to CompilerInstance

2018-10-26 Thread Scott Linder via Phabricator via cfe-commits
scott.linder created this revision. scott.linder added a reviewer: rsmith. Herald added a subscriber: cfe-commits. An attempt at removing one instance of a hardcoded output stream in `CompilerInstance::ExecuteAction`. There are still other cases of output being hard-coded to standard streams in

[PATCH] D53771: [clang-tidy] Avoid C arrays check

2018-10-26 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. `modernize` would be a fitting module, wouldn't it? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53771 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-10-26 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:3913 +for (auto Type : Types) { + if (S.Context.getCanonicalType(Type)->getTypeClass() != Type::Vector) +return false; hubert.reinterpretcast

[PATCH] D53707: [Fixed Point Arithmetic] Refactor fixed point casts

2018-10-26 Thread Bjorn Pettersson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC345398: [Fixed Point Arithmetic] Refactor fixed point casts (authored by bjope, committed by ). Changed prior to commit: https://reviews.llvm.org/D53707?vs=171113=171311#toc Repository: rC Clang

[PATCH] D50860: [libc++][test] Remove non-portable assumption that thread's constructor allocates with ::new

2018-10-26 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter added a comment. I'll put this explanation in the comments and push a change. Comment at: test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp:121 //allocations. +int numAllocs; + EricWF wrote: > Why? `main`

[PATCH] D53206: Allow padding checker to traverse simple class hierarchies

2018-10-26 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/PaddingChecker.cpp:78-81 +// We need to be looking at a definition, not just any pointer to the +// declaration. +if (!(RD = RD->getDefinition())) + return; tekknolagi wrote: >

[PATCH] D53772: [NFC][OpenMP] Add new test for parallel for code generation.

2018-10-26 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC345417: [NFC][OpenMP] Add new test for parallel for code generation. (authored by gbercea, committed by ). Repository: rC Clang https://reviews.llvm.org/D53772 Files:

[PATCH] D53772: [NFC][OpenMP] Add new test for parallel for code generation.

2018-10-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang https://reviews.llvm.org/D53772 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r345417 - [NFC][OpenMP] Add new test for parallel for code generation.

2018-10-26 Thread Gheorghe-Teodor Bercea via cfe-commits
Author: gbercea Date: Fri Oct 26 11:59:52 2018 New Revision: 345417 URL: http://llvm.org/viewvc/llvm-project?rev=345417=rev Log: [NFC][OpenMP] Add new test for parallel for code generation. Summary: This is a simple test of the parallel for code generation. It will be used to showcase the

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

2018-10-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/ConstValueReturnCheck.cpp:107 +diag(Def->getInnerLocStart(), "return type %0 is 'const'-qualified " + "hindering compiler optimizations") +<<

[PATCH] D53771: [clang-tidy] Avoid C arrays check

2018-10-26 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. May be this check belongs to modernize? Comment at: docs/clang-tidy/checks/misc-avoid-c-arrays.rst:6 + +Find C-style array delarations and recommend to use ``std::array<>``. +All types of C arrays are diagnosed. Finds.

[PATCH] D53751: [ASTImporter] Added Import functions for transition to new API.

2018-10-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 171292. balazske added a comment. - Added missing Import_New with Selector and DeclarationName. Repository: rC Clang https://reviews.llvm.org/D53751 Files: include/clang/AST/ASTImporter.h lib/AST/ASTImporter.cpp Index: lib/AST/ASTImporter.cpp

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

2018-10-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang-tidy/readability/ConstValueReturnCheck.cpp:107 +diag(Def->getInnerLocStart(), "return type %0 is 'const'-qualified " + "hindering compiler optimizations") +<<

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

2018-10-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 171293. ymandel marked 4 inline comments as done. ymandel added a comment. Reword comment on the check, for clarity. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53025 Files: clang-tidy/readability/CMakeLists.txt

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

2018-10-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/ConstValueReturnCheck.cpp:107 +diag(Def->getInnerLocStart(), "return type %0 is 'const'-qualified " + "hindering compiler optimizations") +<<

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

2018-10-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/extension-begin.cl:43 g(0); // expected-error {{no matching function for call to 'g'}} -// expected-note@-26 {{candidate unavailable as it requires OpenCL extension 'my_ext' to be disabled}} -//

[PATCH] D44100: [ASTImporter] Reorder fields after structure import is finished

2018-10-26 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added a comment. Hi Gabor, I have tried to rebase it last week but there were some test failures. I hope to fix them this weekend and finally commit the patch. Repository: rC Clang https://reviews.llvm.org/D44100 ___ cfe-commits

[PATCH] D53417: [Clang][Sema][PowerPC] Choose a better candidate in overload function call if there is a compatible vector conversion instead of ambiguous call error

2018-10-26 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:3913 +for (auto Type : Types) { + if (S.Context.getCanonicalType(Type)->getTypeClass() != Type::Vector) +return false; wuzish wrote: >

[PATCH] D53771: [clang-tidy] Avoid C arrays check

2018-10-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: aaron.ballman, JonasToth, alexfh, hokein, xazax.hun. lebedev.ri added a project: clang-tools-extra. Herald added subscribers: rnkovacs, mgorny. lebedev.ri edited the summary of this revision. PR39224

[PATCH] D53771: [clang-tidy] Avoid C arrays check

2018-10-26 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: docs/clang-tidy/checks/list.rst:13 abseil-redundant-strcat-calls - abseil-string-find-startswith abseil-str-cat-append spurious change Comment at: docs/clang-tidy/checks/list.rst:154

[PATCH] D53772: [NFC][OpenMP] Add new test for parallel for code generation.

2018-10-26 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea created this revision. gtbercea added reviewers: ABataev, caomhin. Herald added subscribers: cfe-commits, guansong. This is a simple test of the parallel for code generation. It will be used to showcase the change introduced by patch https://reviews.llvm.org/D53443. Repository: rC

[PATCH] D53605: [AST] Refactor PredefinedExpr

2018-10-26 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 171326. riccibruno marked 4 inline comments as done. riccibruno retitled this revision from "[AST] Pack PredefinedExpr" to "[AST] Refactor PredefinedExpr". riccibruno edited the summary of this revision. riccibruno added a comment. Address rjmcall's

[PATCH] D53771: [clang-tidy] Avoid C arrays check

2018-10-26 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/clang-tidy/misc-avoid-c-arrays.cpp:14 + +template +class array { JonasToth wrote: > Please add a case with templates, where `T` itself is the array type, maybe > there are other fancy template tricks that

r345398 - [Fixed Point Arithmetic] Refactor fixed point casts

2018-10-26 Thread Bjorn Pettersson via cfe-commits
Author: bjope Date: Fri Oct 26 09:12:12 2018 New Revision: 345398 URL: http://llvm.org/viewvc/llvm-project?rev=345398=rev Log: [Fixed Point Arithmetic] Refactor fixed point casts Summary: - Added names for some emitted values (such as "tobool" for the result of a cast to boolean). - Replaced

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-10-26 Thread Bjorn Pettersson via Phabricator via cfe-commits
bjope added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:3208 + if (LHSWidth < CommonWidth) +LHS = LHSSign ? Builder.CreateSExt(LHS, CommonTy) + : Builder.CreateZExt(LHS, CommonTy); `LHS = Builder.CreateIntCast(LHS,

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

2018-10-26 Thread Alexey Sachkov via Phabricator via cfe-commits
AlexeySachkov added inline comments. Comment at: test/SemaOpenCL/extension-begin.cl:43 g(0); // expected-error {{no matching function for call to 'g'}} -// expected-note@-26 {{candidate unavailable as it requires OpenCL extension 'my_ext' to be disabled}} -//

[PATCH] D53770: Support g++ headers in include/g++

2018-10-26 Thread David Greene via Phabricator via cfe-commits
greened created this revision. greened added reviewers: danalbert, dlj, atanasyan, phosek. Herald added a subscriber: cfe-commits. Some gcc installations put C++ headers in PREFIX/include/g++ without indicating a gcc version at all. Typically this is because the version is encoded somewhere in

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

2018-10-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as done. ymandel added inline comments. Comment at: clang-tidy/readability/ConstValueReturnCheck.cpp:107 +diag(Def->getInnerLocStart(), "return type %0 is 'const'-qualified " + "hindering compiler

[PATCH] D52676: [clang-format] tweaked another case of lambda formatting

2018-10-26 Thread Oleg Smolsky via Phabricator via cfe-commits
oleg.smolsky added a comment. Folks, are there any other comments/suggestions? Repository: rC Clang https://reviews.llvm.org/D52676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D53206: Allow padding checker to traverse simple class hierarchies

2018-10-26 Thread Max Bernstein via Phabricator via cfe-commits
tekknolagi added inline comments. Comment at: lib/StaticAnalyzer/Checkers/PaddingChecker.cpp:78-81 +// We need to be looking at a definition, not just any pointer to the +// declaration. +if (!(RD = RD->getDefinition())) + return; tekknolagi

[clang-tools-extra] r345418 - [clang-doc] Switch to default to all-TUs executor

2018-10-26 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Fri Oct 26 12:11:34 2018 New Revision: 345418 URL: http://llvm.org/viewvc/llvm-project?rev=345418=rev Log: [clang-doc] Switch to default to all-TUs executor Since we generally want to document a whole project, not just one file. Differential Revision:

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

2018-10-26 Thread Julie Hockett via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE345418: [clang-doc] Switch to default to all-TUs executor (authored by juliehockett, committed by ). Changed prior to commit: https://reviews.llvm.org/D53170?vs=169414=171331#toc Repository: rCTE

[PATCH] D53607: [AST] Only store the needed data in IfStmt.

2018-10-26 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 171332. riccibruno added a reviewer: rsmith. riccibruno added a comment. Add a flag to the output of -ast-dump indicating which sub-statement `IfStmt` is storing. This removes the ambiguity in the output of -ast-dump and addresses rsmith's comment in

[PATCH] D53771: [clang-tidy] Avoid C arrays check

2018-10-26 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: test/clang-tidy/misc-avoid-c-arrays.cpp:14 + +template +class array { lebedev.ri wrote: > JonasToth wrote: > > Please add a case with templates, where `T` itself is the array type, maybe > > there are other fancy

[PATCH] D53621: Support for groups of attributes in #pragma clang attribute

2018-10-26 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. LGTM too when Aaron's comments are addressed https://reviews.llvm.org/D53621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D53770: Support g++ headers in include/g++

2018-10-26 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. This needs a test. Comment at: lib/Driver/ToolChains/Linux.cpp:927-928 LibDir.str() + "/../include/c++", + // Some gcc installations put headers under "g++" without a + // version suffix. + LibDir.str() + "/../include/g++",

[PATCH] D53609: [AST] Don't store data for GNU range case statement if not needed.

2018-10-26 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 171336. riccibruno added a reviewer: rsmith. riccibruno added a comment. Add a flag in the output of -ast-dump to indicate that a `CaseStmt` is a GNU range case statement, following rsmith's comment in https://reviews.llvm.org/D53717 Repository: rC

r345423 - Fix test expectation to match reality.

2018-10-26 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Oct 26 12:42:43 2018 New Revision: 345423 URL: http://llvm.org/viewvc/llvm-project?rev=345423=rev Log: Fix test expectation to match reality. Modified: cfe/trunk/test/SemaCXX/alignof.cpp Modified: cfe/trunk/test/SemaCXX/alignof.cpp URL:

[PATCH] D50860: [libc++][test] Remove non-portable assumption that thread's constructor allocates with ::new

2018-10-26 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter updated this revision to Diff 171344. CaseyCarter added a comment. Clarify use of `numAllocs`. https://reviews.llvm.org/D50860 Files: test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp Index:

[PATCH] D53787: [Sema] Use proper visibility for global new and delete declarations

2018-10-26 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: rsmith, rnk. Herald added a subscriber: cfe-commits. When the global new and delete operators aren't declared, Clang provides and implicit declaration, but this declaration currently always uses the default visibility. This is a problem when

[PATCH] D52615: Handle -fsanitize-address-poison-class-member-array-new-cookie in the driver and propagate it to cc1

2018-10-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. So, three points: - That's not class-member-specific; you can have a placement `operator new[]` at global scope that isn't the special `void*` placement operator and therefore still has a cookie, and it would have just as much flexibility as a class-member override

Buildbot numbers for the week of 10/7/018 - 10/13/2018

2018-10-26 Thread Galina Kistanova via cfe-commits
Hello everyone, Below are some buildbot numbers for the week of 10/7/018 - 10/13/2018. Please see the same data in attached csv files: The longest time each builder was red during the week; "Status change ratio" by active builder (percent of builds that changed the builder status from greed to

Buildbot numbers for the last week of 10/14/2018 - 10/20/2018

2018-10-26 Thread Galina Kistanova via cfe-commits
Hello everyone, Below are some buildbot numbers for the last week of 10/14/2018 - 10/20/2018. Please see the same data in attached csv files: The longest time each builder was red during the week; "Status change ratio" by active builder (percent of builds that changed the builder status from

[PATCH] D53705: [OpenCL] Postpone PSV address space diagnostic

2018-10-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I don't suppose there's any chance you can just tell Khronos to fix their stuff. It's a little funny to be more conservative about keywords in C++ when the C++ committee is actually much more aggressive about adding keywords in the non-reserved space than C is.

[PATCH] D53725: [CodeGen] Move `emitConstant` from ScalarExprEmitter to CodeGenFunction. NFC.

2018-10-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. This should at least be named `emitScalarConstant`. https://reviews.llvm.org/D53725 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r345439 - Pass the nopie flag to the linker when linking with -pg.

2018-10-26 Thread Brad Smith via cfe-commits
Author: brad Date: Fri Oct 26 17:23:28 2018 New Revision: 345439 URL: http://llvm.org/viewvc/llvm-project?rev=345439=rev Log: Pass the nopie flag to the linker when linking with -pg. Modified: cfe/trunk/lib/Driver/ToolChains/OpenBSD.cpp cfe/trunk/test/Driver/openbsd.c Modified:

[PATCH] D53457: clang-cl: Add "/clang:" pass-through arg support.

2018-10-26 Thread Neeraj K. Singh via Phabricator via cfe-commits
neerajksingh updated this revision to Diff 171382. neerajksingh added a comment. Fix hans' comments. https://reviews.llvm.org/D53457 Files: docs/UsersManual.rst include/clang/Driver/CLCompatOptions.td include/clang/Driver/Driver.h lib/Driver/Driver.cpp test/Driver/cl-options.c

r345440 - Update the other test.

2018-10-26 Thread Brad Smith via cfe-commits
Author: brad Date: Fri Oct 26 17:46:12 2018 New Revision: 345440 URL: http://llvm.org/viewvc/llvm-project?rev=345440=rev Log: Update the other test. Modified: cfe/trunk/test/Driver/openbsd.c Modified: cfe/trunk/test/Driver/openbsd.c URL:

r345443 - Revert "Pass the nopie flag to the linker when linking with -pg." until

2018-10-26 Thread Brad Smith via cfe-commits
Author: brad Date: Fri Oct 26 18:14:22 2018 New Revision: 345443 URL: http://llvm.org/viewvc/llvm-project?rev=345443=rev Log: Revert "Pass the nopie flag to the linker when linking with -pg." until one of the tests can be fixed on !OpenBSD hosts. Modified:

[PATCH] D53674: [CodeGen] Fix assertion on referencing constexpr Obj-C object with ARC.

2018-10-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGObjC.cpp:2480 + SuppressResultRetain); } vsapsai wrote: > rjmccall wrote: > > This switch is just checking what you already computed as > > `SuppressResultRetain`.

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-10-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D53738#1277172, @ebevhan wrote: > I want to float the idea again of adding an AST type to encapsulate an > arbitrary fixed-point semantic and using that as the 'common type' for binary > operations involving fixed-point types. This would

[PATCH] D53605: [AST] Refactor PredefinedExpr

2018-10-26 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. Comment at: include/clang/AST/Stmt.h:279 +/// in PredefinedExpr::IdentType. +unsigned Type : 4; + rjmccall wrote: > Since you're changing

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-10-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/AST/Expr.cpp:1609 case CK_AddressSpaceConversion: -assert(getType()->isPointerType() || getType()->isBlockPointerType()); -assert(getSubExpr()->getType()->isPointerType() || -

[PATCH] D53714: [AST] Only store the needed data in SwitchStmt.

2018-10-26 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. Repository: rC Clang https://reviews.llvm.org/D53714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D53715: [AST] Only store the needed data in WhileStmt.

2018-10-26 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 171338. riccibruno added a reviewer: rsmith. riccibruno added a comment. Add a flag to the output of -ast-dump indicating which sub-statement a `WhileStmt` is storing. Repository: rC Clang https://reviews.llvm.org/D53715 Files:

[PATCH] D53207: Fix bug 26547 - alignof should return ABI alignment, not preferred alignment

2018-10-26 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL345419: PR26547: alignof should return ABI alignment, not preferred alignment (authored by rsmith, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D53684: [COFF, ARM64] Change setjmp for AArch64 Windows to use Intrinsic.sponentry

2018-10-26 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo accepted this revision. mstorsjo added a comment. This revision is now accepted and ready to land. Looks good to me, once the dependency patch is done. Repository: rC Clang https://reviews.llvm.org/D53684 ___ cfe-commits mailing list

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

2018-10-26 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/readability/IsolateDeclarationCheck.cpp:52 + const LangOptions ) { + assert(Indirections >= 0 && "Indirections must be non-negative"); + if (Indirections == 0)

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

2018-10-26 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 171346. JonasToth marked 16 inline comments as done. JonasToth added a comment. - address review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51949 Files: clang-tidy/readability/CMakeLists.txt

r345419 - PR26547: alignof should return ABI alignment, not preferred alignment

2018-10-26 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Oct 26 12:26:45 2018 New Revision: 345419 URL: http://llvm.org/viewvc/llvm-project?rev=345419=rev Log: PR26547: alignof should return ABI alignment, not preferred alignment Summary: - Add `UETT_PreferredAlignOf` to account for the difference between `__alignof` and

[PATCH] D53717: [AST] Only store the needed data in ForStmt.

2018-10-26 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/AST/Stmt.h:1863 + Expr *getCond() { +return reinterpret_cast(getTrailingObjects()[condOffset()]); + } riccibruno wrote: > rsmith wrote: > > Please `static_cast` rather than `reinterpret_cast`

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

2018-10-26 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 171361. JonasToth added a comment. - [Fix] wrong condition in matcher coming from incorrect code change Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51949 Files: clang-tidy/readability/CMakeLists.txt

[PATCH] D53780: Fix bitcast to address space cast for coerced load/stores

2018-10-26 Thread David Salinas via Phabricator via cfe-commits
david-salinas created this revision. david-salinas added reviewers: yaxunl, scchan. Herald added a subscriber: cfe-commits. Coerced load/stores through memory do not take into account potential address space differences when it creates its bitcasts. Repository: rC Clang

[PATCH] D53781: [ASTMatchers] add a matcher for static locals

2018-10-26 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech created this revision. jranieri-grammatech added reviewers: aaron.ballman, klimek, sbenza. Herald added a subscriber: cfe-commits. This adds a matcher, isStaticLocal, that matches local static variables (i.e. VarDecl::isStaticLocal). Repository: rC Clang

[PATCH] D53780: Fix bitcast to address space cast for coerced load/stores

2018-10-26 Thread David Salinas via Phabricator via cfe-commits
david-salinas updated this revision to Diff 171367. david-salinas added a comment. remove __attribute__((cpu)) __attribute__((hc)) from test Repository: rC Clang https://reviews.llvm.org/D53780 Files: lib/CodeGen/CGCall.cpp test/CodeGenCXX/address-space-cast-coerce.cpp Index:

  1   2   >