[PATCH] D53921: Compound literals and enums require constant inits

2018-10-31 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. void added a reviewer: rsmith. Herald added a subscriber: cfe-commits. Both compound literals and enums require their initializers to be constant. Wrap the initializer expressions in a ConstantExpr so that we can easily check for this later on. Repository: rC Clang

[PATCH] D53870: [clang-cl] Put dllexport attrs on static locals also in template instantiations (PR39496)

2018-10-31 Thread Takuto Ikuta via Phabricator via cfe-commits
takuto.ikuta accepted this revision. takuto.ikuta added a comment. LGTM, thank you for fix! https://reviews.llvm.org/D53870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r345699 - [clang-cl] Inherit dllexport to static locals also in template instantiations (PR39496)

2018-10-31 Thread Hans Wennborg via cfe-commits
Author: hans Date: Wed Oct 31 01:38:48 2018 New Revision: 345699 URL: http://llvm.org/viewvc/llvm-project?rev=345699&view=rev Log: [clang-cl] Inherit dllexport to static locals also in template instantiations (PR39496) In the course of D51340, @takuto.ikuta discovered that Clang fails to put dll

[PATCH] D53870: [clang-cl] Put dllexport attrs on static locals also in template instantiations (PR39496)

2018-10-31 Thread Hans Wennborg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC345699: [clang-cl] Inherit dllexport to static locals also in template instantiations… (authored by hans, committed by ). Repository: rC Clang https://reviews.llvm.org/D53870 Files: include/clang/Se

[PATCH] D53922: [clangd] fix non linux build

2018-10-31 Thread David CARLIER via Phabricator via cfe-commits
devnexen created this revision. devnexen added reviewers: kadircet, sammccall. devnexen created this object with visibility "All Users". Herald added subscribers: cfe-commits, jfb, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov, krytarowski. There is no SCHED_IDLE semantic equivalent in BSD sy

[PATCH] D53870: [clang-cl] Put dllexport attrs on static locals also in template instantiations (PR39496)

2018-10-31 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: test/CodeGenCXX/dllimport.cpp:1010 +int bar() { T t; return t.foo(); } +// MO1-DAG: @"?x@?{{1|2}}??foo@?$T@H@pr39496@@Q{{[A-Z]*}}HXZ@4HA" = available_externally dllimport global i32 0, align 4 +} rnk wrote: > I notice that

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

2018-10-31 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:5719 + TSK != TSK_ExplicitInstantiationDeclaration && + TSK != TSK_ExplicitInstantiationDefinition) { +if (ClassExported) { hans wrote: > takuto.ikuta wrote: > > hans

[PATCH] D53922: [clangd] fix non linux build

2018-10-31 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Thanks! We should work out what to do on BSD+Mac (and windows at some point), but no-op is good for now. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53922 ___

[PATCH] D53900: [CodeComplete] Penalize inherited ObjC properties for auto-completion

2018-10-31 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Looks sane to me, you might want someone more familiar with ObjC to verify though. Repository: rC Clang https://reviews.llvm.org/D53900 ___

[clang-tools-extra] r345700 - [clangd] fix non linux build

2018-10-31 Thread David Carlier via cfe-commits
Author: devnexen Date: Wed Oct 31 02:04:15 2018 New Revision: 345700 URL: http://llvm.org/viewvc/llvm-project?rev=345700&view=rev Log: [clangd] fix non linux build There is no SCHED_IDLE semantic equivalent in BSD systems. Reviewers: kadircet, sammccall Revieweed By: sammccall Differential Rev

[PATCH] D53922: [clangd] fix non linux build

2018-10-31 Thread David CARLIER via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL345700: [clangd] fix non linux build (authored by devnexen, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D53922?vs=171870&id=171873#toc Rep

[PATCH] D53922: [clangd] fix non linux build

2018-10-31 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. For NetBSD: - `ThreadPriority::Low` select either `SCHED_RR` or `SCHED_FIFO`, call sched_get_priority_min() and set pthread_setschedparam(). - `ThreadPriority::Normal` use SCHED_OTHER with `PRI_NONE`. Repository: rL LLVM https://reviews.llvm.org/D53922 __

[PATCH] D53433: [clangd] auto-index stores symbols per-file instead of per-TU.

2018-10-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/index/SymbolCollector.cpp:619 + shouldIndexFile(SM, SM.getFileID(Loc), Opts, &FilesToIndexCache); + if (auto DefLoc = getTokenLocation(Loc, ND.getASTContext().getSourceManager(), Opts, AST

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

2018-10-31 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. In https://reviews.llvm.org/D53738#1281332, @rjmccall wrote: > Well, maybe the cleanest solution would be to actually fold > `CompoundAssignOperator` back into `BinaryOperator` and just allow > `BinaryOperator` to optionally store information about the intermediate type

[PATCH] D53922: [clangd] fix non linux build

2018-10-31 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D53922#1281882, @krytarowski wrote: > For NetBSD: > > - `ThreadPriority::Low` select either `SCHED_RR` or `SCHED_FIFO`, call > sched_get_priority_min() and set pthread_setschedparam(). https://www.netbsd.org/docs/internals/en/chap-processe

[PATCH] D53922: [clangd] fix non linux build

2018-10-31 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. In https://reviews.llvm.org/D53922#1281898, @sammccall wrote: > In https://reviews.llvm.org/D53922#1281882, @krytarowski wrote: > > > For NetBSD: > > > > - `ThreadPriority::Low` select either `SCHED_RR` or `SCHED_FIFO`, call > > sched_get_priority_min() and set pthre

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

2018-10-31 Thread Takuto Ikuta via Phabricator via cfe-commits
takuto.ikuta updated this revision to Diff 171877. takuto.ikuta added a comment. Rebased to take r345699 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/C

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

2018-10-31 Thread Takuto Ikuta via Phabricator via cfe-commits
takuto.ikuta added a comment. Thank you for quick fix! Comment at: clang/lib/AST/ASTContext.cpp:9552 +// overwrite linkage of explicit template instantiation +// definition/declaration. +return GVA_DiscardableODR; takuto.ikuta wrote: > hans wrote: >

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

2018-10-31 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:9552 +// overwrite linkage of explicit template instantiation +// definition/declaration. +return GVA_DiscardableODR; takuto.ikuta wrote: > takuto.ikuta wrote: > > hans wrote: > > >

[PATCH] D53919: [X86] Don't allow illegal vector types to return by direct value.

2018-10-31 Thread H.J Lu via Phabricator via cfe-commits
hjl.tools added inline comments. Comment at: lib/CodeGen/TargetInfo.cpp:2862 // place naturally. - if (!isAggregateTypeForABI(Ty)) { + if (!isAggregateTypeForABI(Ty) && !IsIllegalVectorType(Ty)) { // Treat an enum type as its underlying type. Doesn't -m

[PATCH] D53922: [clangd] fix non linux build

2018-10-31 Thread David CARLIER via Phabricator via cfe-commits
devnexen added a comment. I thought applying this sort of change for BSD but SCHED_IDLE is a GNU extension and does not have equivalence per see. Repository: rL LLVM https://reviews.llvm.org/D53922 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D53922: [clangd] fix non linux build

2018-10-31 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D53922#1281902, @krytarowski wrote: > In https://reviews.llvm.org/D53922#1281898, @sammccall wrote: > > > In https://reviews.llvm.org/D53922#1281882, @krytarowski wrote: > > > > > For NetBSD: > > > > > > - `ThreadPriority::Low` select either

[PATCH] D53870: [clang-cl] Put dllexport attrs on static locals also in template instantiations (PR39496)

2018-10-31 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. Bah, I should have known something was going to break if I touched this :-) http://lab.llvm.org:8011/builders/sanitizer-windows/builds/37132 http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/1017 Here's a repro: template struct __declspec(dllimport) S {

[PATCH] D53654: [clang] Improve ctor initializer completions.

2018-10-31 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Mostly NITs Comment at: lib/Sema/SemaCodeComplete.cpp:5136 + auto AddDefaultCtorInit = [&](const char *TypedName, +const char *TypeName, +const NamedDecl* ND) { kadi

r345709 - Follow-up to r345699: Call CheckStaticLocalForDllExport later for templates

2018-10-31 Thread Hans Wennborg via cfe-commits
Author: hans Date: Wed Oct 31 03:34:46 2018 New Revision: 345709 URL: http://llvm.org/viewvc/llvm-project?rev=345709&view=rev Log: Follow-up to r345699: Call CheckStaticLocalForDllExport later for templates Calling it too early might cause dllimport to get inherited onto the VarDecl before the in

[PATCH] D53870: [clang-cl] Put dllexport attrs on static locals also in template instantiations (PR39496)

2018-10-31 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. r345709 should do it. Repository: rC Clang https://reviews.llvm.org/D53870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-10-31 Thread Takuto Ikuta via Phabricator via cfe-commits
takuto.ikuta added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:9552 +// overwrite linkage of explicit template instantiation +// definition/declaration. +return GVA_DiscardableODR; hans wrote: > takuto.ikuta wrote: > > takuto.ikuta wrote

[PATCH] D53925: [modules] Defer emission of inline key functions.

2018-10-31 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev created this revision. v.g.vassilev added reviewers: rsmith, bruno. Herald added a subscriber: cfe-commits. If the ABI supports inline key functions we must emit them eagerly. The generic reason is that CodeGen might assume they are emitted and generate a reference to the vtable. In

[PATCH] D53866: [Preamble] Fix preamble for circular #includes

2018-10-31 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Why does resetting the conditional stack is the right thing to do here? I can see how it can hide the problem, but can't come up with with a consistent model to handle the fact that the file contents were trimmed. Failing to build the preamble in that case seems li

[PATCH] D53925: [modules] Defer emission of inline key functions.

2018-10-31 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. @rsmith, @bruno could you verify this patch on your codebases? Repository: rC Clang https://reviews.llvm.org/D53925 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listin

[PATCH] D52695: [clang][Parse] Diagnose useless null statements (PR39111)

2018-10-31 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Ping. Repository: rC Clang https://reviews.llvm.org/D52695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2018-10-31 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In https://reviews.llvm.org/D53457#1279191, @neerajksingh wrote: > In https://reviews.llvm.org/D53457#1278579, @hans wrote: > > > The `-Xclang` option has the same issue, and I think `/clang:` should work > > similarly, i.e. `/clang:-MF /clang:`. It's not pretty, but at >

[PATCH] D53926: [clangd] Only add global scope to completion query scopes for TU context.

2018-10-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. This avoids duplicated scopes in the query e.g. when anonymous namespace is present. Repository: rCTE Clang Tools Extra https://review

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

2018-10-31 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. FYI, I have created a bug to the OpenCL C++ spec: https://github.com/KhronosGroup/OpenCL-Docs/issues/13. Gladly, we now moved into discussing the issues publicly. So anyone can create bugs and also participate in discussions. I would like to feed all of the suggestio

[PATCH] D53928: Enable builtins necessary for SLEEF [AArch64] vectorized trigonometry libm functions

2018-10-31 Thread Stefan Teleman via Phabricator via cfe-commits
steleman created this revision. steleman added a reviewer: joel_k_jones. Herald added subscribers: kristina, kristof.beyls, javed.absar. This changeset adds the required Builtins for enabling AArch64 vectorization of libm trigonometry functions via SLEEF: http://sleef.org/. - A new argument is a

[PATCH] D53866: [Preamble] Fix preamble for circular #includes

2018-10-31 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. In https://reviews.llvm.org/D53866#1281978, @ilya-biryukov wrote: > Why does resetting the conditional stack is the right thing to do here? Because this case can be detected and handled without loosing the benefits of the preamble. > Failing to build the preamble in that

[PATCH] D53922: [clangd] fix non linux build

2018-10-31 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added a comment. In https://reviews.llvm.org/D53922#1281914, @sammccall wrote: > Thanks. I was replying to your suggestion for NetBSD though - my reading of > the docs says your "low" suggestion would end up being a very high priority. > Is this not the case? Can you suggest a bette

[PATCH] D53882: [clang-tidy] Adding Zircon checker for std namespace

2018-10-31 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tools-extra/clang-tidy/zircon/NoStdNamespaceCheck.cpp:30 + if (const NamedDecl *AN = Node.getAliasedNamespace()) { +// If this aliases to an actual namespace, check if its std. +if (const auto *N = dyn_cast(AN)) ---

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

2018-10-31 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 171897. ymandel marked 2 inline comments as done. ymandel added a comment. Small tweaks in response to comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53025 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/Co

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

2018-10-31 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In https://reviews.llvm.org/D53025#1281097, @aaron.ballman wrote: > I think this is getting really close! One question: would it make more sense > to name this `readability-const-type-return` or > `readability-const-return-type` instead? It's not that the functions retu

[PATCH] D53654: [clang] Improve ctor initializer completions.

2018-10-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 171899. kadircet marked 8 inline comments as done. kadircet added a comment. - Address comments. Repository: rC Clang https://reviews.llvm.org/D53654 Files: lib/Sema/SemaCodeComplete.cpp test/CodeCompletion/ctor-initializer.cpp test/Index/complete

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

2018-10-31 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 171900. ymandel added a comment. Rename readability-const-value-return to readability-const-return-type Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53025 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ConstReturn

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

2018-10-31 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. I've renamed the check. I noticed that the script did not rename the header guard macro, though. Please let me know if/where to file a bug. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53025 ___ cfe-comm

[PATCH] D53654: [clang] Improve ctor initializer completions.

2018-10-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:5136 + auto AddDefaultCtorInit = [&](const char *TypedName, +const char *TypeName, +const NamedDecl* ND) { ilya-biryukov wro

[clang-tools-extra] r345716 - [clang-tidy] Remove false decoupling in ClangTidyContext. NFC

2018-10-31 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Oct 31 06:08:19 2018 New Revision: 345716 URL: http://llvm.org/viewvc/llvm-project?rev=345716&view=rev Log: [clang-tidy] Remove false decoupling in ClangTidyContext. NFC These getters/setters don't encapsulate any behavior, and can only be called by friends. Modified:

[PATCH] D53433: [clangd] auto-index stores symbols per-file instead of per-TU.

2018-10-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 171901. ioeric marked 3 inline comments as done. ioeric added a comment. - Merged with multi-threading changes. Added mutex for file digests. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53433 Files: clangd/index/Background.cpp clangd/

[PATCH] D53433: [clangd] auto-index stores symbols per-file instead of per-TU.

2018-10-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Made some more changes to make the code work in multiple threads (add mutex for digests, take snapshot of digests for each run etc). PTAL Comment at: clangd/index/Background.cpp:311 SPAN_ATTACH(Tracer, "refs", int(Refs.numRefs())); - // FIXME: parti

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

2018-10-31 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:9552 +// overwrite linkage of explicit template instantiation +// definition/declaration. +return GVA_DiscardableODR; takuto.ikuta wrote: > hans wrote: > > takuto.ikuta wrote: > > >

[PATCH] D53666: [Tests] Updated tests for D53342

2018-10-31 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 171906. https://reviews.llvm.org/D53666 Files: lib/CodeGen/SelectionDAG/DAGCombiner.cpp test/CodeGen/X86/combine-sdiv.ll test/CodeGen/X86/combine-srem.ll test/CodeGen/X86/combine-udiv.ll test/CodeGen/X86/combine-urem.ll Index: test/CodeGen/X86/com

[PATCH] D53882: [clang-tidy] Adding Zircon checker for std namespace

2018-10-31 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:176 + + Warns when the `std` namespace is used, as its use is against Zircon's libc++ + policy for the kernel. alexfh wrote: > JonasToth wrote: > > s/its/it's/ > > > > Could `

[PATCH] D53666: [Tests] Updated tests for D53342

2018-10-31 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 171908. https://reviews.llvm.org/D53666 Files: test/CodeGen/tbaa-struct.cpp Index: test/CodeGen/tbaa-struct.cpp === --- test/CodeGen/tbaa-struct.cpp +++ test/CodeGen/tbaa-struct.cpp @@ -17,7

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

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

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

2018-10-31 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth marked an inline comment as done. JonasToth added inline comments. Comment at: clang-tidy/readability/IsolateDeclarationCheck.cpp:119 + const LangOptions &LangOpts) { + std::size_t DeclCount = std::distance(DS->decl_begin(), DS->decl_end()); + if (DeclCount

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

2018-10-31 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Hi Davide, I'd like to draw your attention to an important relation of this patch to a bug in LLDB which manifests as incorrect vtable layouts for LLDB expression code. Please see the conversation started with this message: https://lists.llvm.org/pipermail/cfe-dev/2018-

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

2018-10-31 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. LGTM! Thanks, I think it is much easier to understand what is going on this way. https://reviews.llvm.org/D52742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

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

2018-10-31 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hello everyone. @martong : this version of patch reorders only fields and friends. No method reordering is done (I can check if it works, though, and add the feature). @davide: Unfortunately, I was not able to reproduce the problem on Linux. Could you please provide a

[PATCH] D52794: [analyzer][PlistMacroExpansion] Part 2.: Retrieving the macro name and primitive expansion

2018-10-31 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Please add a test case where a bug path goes through a macro definition and this macro is undefed at the end of the translation unit. Comment at: lib/StaticAnalyzer/Core/PlistDiagnostics.cpp:667 + +//===---

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

2018-10-31 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. This LGTM, thank you for working on this check! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53025 ___ cfe-commi

[PATCH] D53933: [clangd] Get rid of QueryScopes.empty() == AnyScope special case.

2018-10-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53933 Files: clangd/FindSymbols.cpp clangd/index/Index.h clangd/inde

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

2018-10-31 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! Comment at: docs/clang-tidy/checks/readability-isolate-declaration.rst:45 + +Global variables and member variables are excluded. + JonasT

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

2018-10-31 Thread Takuto Ikuta via Phabricator via cfe-commits
takuto.ikuta updated this revision to Diff 171916. takuto.ikuta added a comment. export/import explicit template instantiation function https://reviews.llvm.org/D51340 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/LangOptions.h clang/include/clang/Driver/CC1Options.td

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

2018-10-31 Thread Takuto Ikuta via Phabricator via cfe-commits
takuto.ikuta marked an inline comment as done. takuto.ikuta added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:9552 +// overwrite linkage of explicit template instantiation +// definition/declaration. +return GVA_DiscardableODR; hans wrot

RE: r345676 - [Win64] Handle passing i128 by value

2018-10-31 Thread via cfe-commits
Also, don't we usually put ABI changes under an ABI compatibility check? This would be making Clang incompatible with itself. --paulr From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf Of Richard Trieu via cfe-commits Sent: Tuesday, October 30, 2018 10:16 PM To: Reid Kleckn

[PATCH] D53882: [clang-tidy] Adding Zircon checker for std namespace

2018-10-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I am a bit confused by what this check is trying to accomplish. It seems like this is intended to catch use of anything declared within the standard library, but that includes library support things that are needed to write useful code. For instance, it seems this

[PATCH] D53926: [clangd] Only add global scope to completion query scopes for TU context.

2018-10-31 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/CodeComplete.cpp:563 for (auto *Context : CCContext.getVisitedContexts()) { - if (isa(Context)) + if (isa(Context)) { Info.AccessibleScopes.push_back(""); // global namespace Anonymou

[PATCH] D53926: [clangd] Only add global scope to completion query scopes for TU context.

2018-10-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/CodeComplete.cpp:563 for (auto *Context : CCContext.getVisitedContexts()) { - if (isa(Context)) + if (isa(Context)) { Info.AccessibleScopes.push_back(""); // global namespace ilya-biryukov w

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

2018-10-31 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus marked 2 inline comments as done. Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Core/AnalyzerOptions.cpp:471 +DisplayMacroExpansions = +getBooleanOption("expand-macros", /*Default=*/false); + return DisplayMacroExpansions.getValue(); -

[PATCH] D53866: [Preamble] Fix preamble for circular #includes

2018-10-31 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. > Because this case can be detected and handled without loosing the benefits of > the preamble. The cases where recursive includes make sense are incredibly rare in practice. Most of the time, recursively including the same file is unintentional should be conside

[PATCH] D52949: [Diagnostics] Implement -Wsizeof-pointer-div

2018-10-31 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 171920. xbolva00 added a reviewer: MTC. xbolva00 added a comment. - New warning text, added another test line https://reviews.llvm.org/D52949 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.

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

2018-10-31 Thread Kristof Umann via cfe-commits
Author: szelethus Date: Wed Oct 31 07:54:27 2018 New Revision: 345724 URL: http://llvm.org/viewvc/llvm-project?rev=345724&view=rev Log: [analyzer][PlistMacroExpansion] Part 1.: New expand-macros flag This is the first part of the implementation of the inclusion of macro expansions into the plist

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

2018-10-31 Thread Umann Kristóf via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL345724: [analyzer][PlistMacroExpansion] Part 1.: New expand-macros flag (authored by Szelethus, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org

[PATCH] D53934: [clangd] Improve code completion for ObjC methods

2018-10-31 Thread David Goldman via Phabricator via cfe-commits
dgoldman created this revision. dgoldman added a reviewer: sammccall. Herald added subscribers: cfe-commits, kadircet, jfb, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Previously code completion did not work well for Objective-C methods which contained multiple arguments as clangd did not

[PATCH] D53654: [clang] Improve ctor initializer completions.

2018-10-31 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:176 public: +void AddConstructorResults(const CXXRecordDecl *Record, Result R); + AddConstructorResults is not defined and not used. Remove it? Repository: rC Clang https:/

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

2018-10-31 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Ping Anything else to be done here? I would like to finish this patch to work on other things. https://reviews.llvm.org/D52835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

[PATCH] D53926: [clangd] Only add global scope to completion query scopes for TU context.

2018-10-31 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/CodeComplete.cpp:563 for (auto *Context : CCContext.getVisitedContexts()) { - if (isa(Context)) + if (isa(Context)) { Info.AccessibleScopes.push_back(""); // global namespace ioeric w

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

2018-10-31 Thread Davide Italiano via Phabricator via cfe-commits
davide added a comment. No worries :) l In https://reviews.llvm.org/D44100#1282148, @martong wrote: > Hi Davide, > > I'd like to draw your attention to an important relation of this patch to a > bug in LLDB which manifests as incorrect vtable layouts for LLDB expression > code. > Please see t

[PATCH] D53926: [clangd] Only add global scope to completion query scopes for TU context.

2018-10-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 171924. ioeric added a comment. - Clarify documentation for printNamespaceScope Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53926 Files: clangd/AST.h clangd/CodeComplete.cpp unittests/clangd/CodeCompleteTests.cpp Index: unittests/

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

2018-10-31 Thread Davide Italiano via Phabricator via cfe-commits
davide added a comment. In https://reviews.llvm.org/D44100#1282157, @a.sidorin wrote: > Hello everyone. > @martong : this version of patch reorders only fields and friends. No method > reordering is done (I can check if it works, though, and add the feature). > @davide: Unfortunately, I was no

[PATCH] D53654: [clang] Improve ctor initializer completions.

2018-10-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 171926. kadircet added a comment. - Revert back declaration. Repository: rC Clang https://reviews.llvm.org/D53654 Files: lib/Sema/SemaCodeComplete.cpp test/CodeCompletion/ctor-initializer.cpp test/Index/complete-ctor-inits.cpp test/Index/complet

[PATCH] D53830: [clang-tidy]: Abseil: new check 'abseil-upgrade-duration-conversions'

2018-10-31 Thread Alex Strelnikov via Phabricator via cfe-commits
astrelni updated this revision to Diff 171925. astrelni marked 9 inline comments as done. astrelni added a comment. Thanks for the feedback so far. Reply to review comments. - Improve comments. - Fix matcher to check for invalid source range. - Improve test coverage for templates and macros. h

[PATCH] D53926: [clangd] Only add global scope to completion query scopes for TU context.

2018-10-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 171928. ioeric added a comment. - revert wrong comment Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53926 Files: clangd/AST.h clangd/CodeComplete.cpp unittests/clangd/CodeCompleteTests.cpp Index: unittests/clangd/CodeCompleteTests.

[PATCH] D53935: Delete dependency on config.h

2018-10-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, jfb, arphaman, jkorous, ioeric, ilya-biryukov, krytarowski. Since llvm/Config/config.h is not available on standalone builds, use __USE_POSIX instead of HAVE_PTHREAD_H and get rid of the i

[PATCH] D53830: [clang-tidy]: Abseil: new check 'abseil-upgrade-duration-conversions'

2018-10-31 Thread Alex Strelnikov via Phabricator via cfe-commits
astrelni marked an inline comment as done. astrelni added inline comments. Comment at: clang-tidy/abseil/UpgradeDurationConversionsCheck.cpp:118 +AST_MATCHER_P(Expr, hasSourceRange, SourceRange, Range) { + return Node.getSourceRange() == Range; +} JonasToth wrot

[PATCH] D53926: [clangd] Only add global scope to completion query scopes for TU context.

2018-10-31 Thread Eric Liu via Phabricator via cfe-commits
ioeric planned changes to this revision. ioeric added a comment. I got the behavior of `printNamespaceScope` wrong in this patch. Will update. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53926 ___ cfe-commits mailing list cfe-com

[PATCH] D53935: Delete dependency on config.h

2018-10-31 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. How does this play with `LLVM_ENABLE_THREADS` cmake option? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53935 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

[PATCH] D53935: Delete dependency on config.h

2018-10-31 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clangd/Threading.cpp:7 #include -#ifdef HAVE_PTHREAD_H +#if defined(__USE_POSIX) #include nit: just ifdef? Repository: rCTE Cla

[PATCH] D53935: Delete dependency on config.h

2018-10-31 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/Threading.cpp:104 void setThreadPriority(std::thread &T, ThreadPriority Priority) { -#if defined(HAVE_PTHREAD_H) && defined(__linux__) +#if defined(__USE_POSIX) && defined(__linux__) sched_param priority; th

[PATCH] D53654: [clang] Improve ctor initializer completions.

2018-10-31 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. Thanks for the change! Repository: rC Clang https://reviews.llvm.org/D53654 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D53935: Delete dependency on config.h

2018-10-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 171931. kadircet marked 2 inline comments as done. kadircet added a comment. - Address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53935 Files: clangd/Threading.cpp Index: clangd/Threading.cpp =

[PATCH] D53935: Delete dependency on config.h

2018-10-31 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D53935#1282303, @lebedev.ri wrote: > How does this play with `LLVM_ENABLE_THREADS` cmake option? Clangd doesn't support/respect that, and I don't think anyone's building in that configuration. If this causes actual problems e.g. with bots,

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

2018-10-31 Thread Oleg Smolsky via Phabricator via cfe-commits
oleg.smolsky marked 2 inline comments as done. oleg.smolsky added inline comments. Comment at: unittests/Format/FormatTest.cpp:11854 + // case above. + { +auto Style = getGoogleStyle(); djasper wrote: > No need to use a scope here. Feel free to redefine Sty

[PATCH] D53935: Delete dependency on config.h

2018-10-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE345729: Delete dependency on config.h (authored by kadircet, committed by ). Changed prior to commit: https://reviews.llvm.org/D53935?vs=171931&id=171933#toc Repository: rL LLVM https://reviews.ll

[PATCH] D53935: Delete dependency on config.h

2018-10-31 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL345729: Delete dependency on config.h (authored by kadircet, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D53935 Files: clang-tools-extra/tru

[clang-tools-extra] r345729 - Delete dependency on config.h

2018-10-31 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Wed Oct 31 08:37:09 2018 New Revision: 345729 URL: http://llvm.org/viewvc/llvm-project?rev=345729&view=rev Log: Delete dependency on config.h Summary: Since llvm/Config/config.h is not available on standalone builds, use __USE_POSIX instead of HAVE_PTHREAD_H and get rid of

[PATCH] D53936: [clang-tidy] More clearly separate public, check-facing APIs from internal ones.

2018-10-31 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added subscribers: cfe-commits, xazax.hun. This codifies the mostly-current state: - The stuff in ClangTidy.h is reasonable for checks to depend on. - The stuff in ClangTidyDiagnosticConsumer.h is a mish-mash of clang-tid

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

2018-10-31 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Looks good! Will stamp when the scopes are removed. Oleg, do you need someone to commit this for you? Repository: rC Clang https://reviews.llvm.org/D52676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://l

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

2018-10-31 Thread Oleg Smolsky via Phabricator via cfe-commits
oleg.smolsky updated this revision to Diff 171932. oleg.smolsky marked 2 inline comments as done. Repository: rC Clang https://reviews.llvm.org/D52676 Files: lib/Format/ContinuationIndenter.cpp lib/Format/FormatToken.h lib/Format/TokenAnnotator.cpp lib/Format/UnwrappedLineFormatter.cpp

[PATCH] D51223: Update tests for new YAMLIO polymorphic traits

2018-10-31 Thread Scott Linder via Phabricator via cfe-commits
scott.linder updated this revision to Diff 171936. scott.linder added a comment. Rebase @klimek is there anyone I should add to take a look at this? As far as the YAML is concerned I believe this is a non-functional change. https://reviews.llvm.org/D51223 Files: unittests/Tooling/Diagnostic

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

2018-10-31 Thread Oleg Smolsky via Phabricator via cfe-commits
oleg.smolsky added a comment. In https://reviews.llvm.org/D52676#1282335, @krasimir wrote: > Looks good! Will stamp when the scopes are removed. Cool, thanks, Krasimir. I've just posted the updated patch. > Oleg, do you need someone to commit this for you? I do, could you commit this please?

[PATCH] D53936: [clang-tidy] More clearly separate public, check-facing APIs from internal ones.

2018-10-31 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 171937. sammccall added a comment. Add FIXME to fuchsia check that uses private APIs. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53936 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidy.h clang-tidy/ClangTidyDiagnosticConsumer

  1   2   3   >