Re: r369251 - [OpenCL] Fix addr space deduction for pointers/references to arrays.

2019-08-21 Thread Hans Wennborg via cfe-commits
Yes, merged in r369499. Thanks, Hans On Tue, Aug 20, 2019 at 3:38 PM Anastasia Stulova wrote: > > > Hi Hans, > > Is it still possible to port this fix to the release branch? > > Thanks, > Anastasia > > > From: cfe-commits on behalf of Anastasia > Stulova via cf

[PATCH] D66336: [ASTImporter] Add development internals docs

2019-08-21 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/docs/InternalsManual.rst:1569 +positive in-equivalencies otherwise. We must not allow having two (or more) +independent redeclaration chains of structurally equivalent declarations. + It can be mentioned that the

[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))

2019-08-21 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. Compilation fails with this patch http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/22936/steps/bootstrap%20clang/logs/stdio [ 8%] Built target LLVMMC /b/sanitizer-x86_64-linux/build/llvm/lib/Support/regcomp.c:541:2: error: unannotated fall-through

[PATCH] D64838: [Attr] Support _attribute__ ((fallthrough))

2019-08-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. This needs to be commited https://reviews.llvm.org/D66487 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64838/new/ https://reviews.llvm.org/D64838 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D66473: [analyzer] Removed some dead code in BugReporter and related files

2019-08-21 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr updated this revision to Diff 216342. gribozavr marked an inline comment as done. gribozavr added a comment. Updated a comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66473/new/ https://reviews.llvm.org/D66473 Files: clang/inclu

[PATCH] D66473: [analyzer] Removed some dead code in BugReporter and related files

2019-08-21 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr marked 2 inline comments as done. gribozavr added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/BugReporter.cpp:2343 InterExplodedGraphMap ForwardMap; - TrimmedGraph = OriginalGraph->trim(Nodes, &ForwardMap, &InverseMap); Szelethus wr

r369504 - Removed some dead code in BugReporter and related files

2019-08-21 Thread Dmitri Gribenko via cfe-commits
Author: gribozavr Date: Wed Aug 21 01:48:24 2019 New Revision: 369504 URL: http://llvm.org/viewvc/llvm-project?rev=369504&view=rev Log: Removed some dead code in BugReporter and related files Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66473 Modified:

[PATCH] D66516: [clangd] Added highlighting to types dependant on templates.

2019-08-21 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, kristof.beyls, javed.absar. Herald added a project: clang. Types dependant on templates did not get highlighted properly. This is because

[PATCH] D66473: [analyzer] Removed some dead code in BugReporter and related files

2019-08-21 Thread Dmitri Gribenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. gribozavr marked an inline comment as done. Closed by commit rL369504: Removed some dead code in BugReporter and related files (authored by gribozavr, committed by ). Herald added a project: LLVM. Herald added a subscriber:

[PATCH] D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes

2019-08-21 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6775 +if (!pathOnlyInitializesGslPointer(Path)) + Init = const_cast(Init->skipRValueSubobjectAdjustments()); I'm afraid this change could disable some other analysis, which would

[PATCH] D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-08-21 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr accepted this revision. gribozavr added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:4596 +for (Decl *Redecl : D->redecls()) { + Redecl->addAttr(::new (S.Context) + OwnerA

[PATCH] D66516: [clangd] Added highlighting to types dependant on templates.

2019-08-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:177 return; +if (TP->isPointerType() || TP->isLValueReferenceType()) + // When highlighting dependant template types the type can be a pointer or `

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Any objections to this patch except “macro” question? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[PATCH] D66478: [clangd] Ignore implicit conversion-operator nodes in find refs.

2019-08-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, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66478/new/ https://reviews.llvm.org/D66478

[PATCH] D66516: [clangd] Added highlighting to types dependant on templates.

2019-08-21 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked an inline comment as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:177 return; +if (TP->isPointerType() || TP->isLValueReferenceType()) + // When highlighting dependant template types the type

[PATCH] D66219: [clangd] Added a colorizer to the vscode extension.

2019-08-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts:134 + // The decoration datatypes used last time highlight was called. + private oldDecorations: DecorationRangePair[] = []; + // Apply decorations to the tex

[clang-tools-extra] r369514 - [clangd] Ignore implicit conversion-operator nodes in find refs.

2019-08-21 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Aug 21 03:54:19 2019 New Revision: 369514 URL: http://llvm.org/viewvc/llvm-project?rev=369514&view=rev Log: [clangd] Ignore implicit conversion-operator nodes in find refs. Reviewers: ilya-biryukov Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #cl

[PATCH] D66478: [clangd] Ignore implicit conversion-operator nodes in find refs.

2019-08-21 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369514: [clangd] Ignore implicit conversion-operator nodes in find refs. (authored by hokein, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit

[PATCH] D66524: [SVE][Inline-Asm] Add constraints for SVE predicate registers

2019-08-21 Thread Kerry McLaughlin via Phabricator via cfe-commits
kmclaughlin created this revision. kmclaughlin added reviewers: t.p.northover, sdesmalen, rovka, momchil.velikov, cameron.mcinally, greened. Herald added subscribers: psnobl, rkruppe, tschuett, javed.absar. Herald added a reviewer: rengolin. Herald added a project: LLVM. kmclaughlin added a parent

[PATCH] D66516: [clangd] Added highlighting to types dependant on templates.

2019-08-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:177 return; +if (TP->isPointerType() || TP->isLValueReferenceType()) + // When highlighting dependant template types the type can be a pointer or j

[PATCH] D66014: [analyzer] Avoid unnecessary enum range check on LValueToRValue casts

2019-08-21 Thread Chris Hamilton via Phabricator via cfe-commits
chrish_ericsson_atx added a comment. Kristoff, if you wouldn't mind, since you offered earlier, please go ahead and commit this change as-is, since it was accepted. I ran into some non-technical issues with my follow-up changes and I'm going to be unavailable for several weeks. To mitigate ri

[PATCH] D66348: [ASTImporter] Do not look up lambda classes

2019-08-21 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 216378. martong added a comment. - Add tests for default constructible and assignable stateless lambdas Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66348/new/ https://reviews.llvm.org/D66348 Files: clang/l

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. Is the test up-to-date ? I tried to apply the patch locally and I get a bunch of failures : error: 'warning' diagnostics expected but not seen: File /home/bruno/software/llvm-project/clang/test/SemaCXX/warn-xor-as-pow.cpp Line 73: result of '2 ^ 64' is 66; di

[PATCH] D62131: [ASTImporter] Remove NonEquivalentDecls from ASTImporter

2019-08-21 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Example about how to get wrong things into `NonEquivalentDecls`: We want to compare `class C` for structural equivalence in the following codes: class A {}; class B {int i;}; void x(A *); void y(A *); class C { friend void x(A *); friend void y(A *); }; and class

[PATCH] D66348: [ASTImporter] Do not look up lambda classes

2019-08-21 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D66348#1636564 , @shafik wrote: > I am not enthusiastic about this solution but I need to think about it some > more. > > We can see that p0624r2 > added >

[PATCH] D66302: [SVE][Inline-Asm] Support for SVE asm operands

2019-08-21 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: lib/Target/AArch64/AArch64AsmPrinter.cpp:618 +bool hasAltName; +const TargetRegisterClass *RegClass; The use of `hasAltName` is confusing me here. When I look at the declaration and definition of `printAsmRe

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> File >> /home/bruno/software/llvm-project/clang/test/SemaCXX/warn-xor-as-pow.cpp >> Line 119: result of '2 ^ ALPHA_OFFSET' is 1; did you mean '1 << >> ALPHA_OFFSET' (8)? This should not warn. Please verify that patch was applied correctly and you use newly built

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D66397#1635857 , @xbolva00 wrote: > >> suggested source-code fixit of #define ALPHA_OFFSET 0x3 > > > No, there is a note “replace with 0x2 ^ ALPHA_OFFSET” to silence it. Didnt > you suggest 0x2 / 0xA? :) > > While we

[PATCH] D66524: [SVE][Inline-Asm] Add constraints for SVE predicate registers

2019-08-21 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: lib/IR/InlineAsm.cpp:188 + unsigned char C = static_cast(*I); + assert(isdigit(C) && "Not a single digit!"); + int N = C - '0'; `"Expected a digit"` seems more appropriate, since this code is only testin

[PATCH] D65744: [PR42707][OpenCL] Fix addr space deduction for auto

2019-08-21 Thread Marco Antognini via Phabricator via cfe-commits
mantognini added a comment. I think this looks good. Maybe the tests should be extended to test `auto` as function return type, and if there's some special handling around `decltype(auto)`, then it should be tested too, but I'm not sure it's actually needed here. What do you think? =

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. I agree. And I think they should just use const int instead of macros after all. Maybe we should just improve silence hint if rhs is macro? #define ALPHA_OFFSET 0x3 ? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 _

[PATCH] D66530: [clangd] Don't collect locations that implicitly refer to the target decl.

2019-08-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay. Herald added a project: clang. A followup of rL369514 , the previous patch was fix the DeclarationAndMacrosFinder (we will not g

[PATCH] D66530: [clangd] Don't collect locations that implicitly refer to the target decl.

2019-08-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This actually seems useful. If one starts the search at `operator bool`, it's nice to see its implicit calls too. What are the cons of having this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66530/new/ https://rev

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. Ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65835/new/ https://reviews.llvm.org/D65835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D65835#1630732 , @jdenny wrote: > I think you're referring to stuff like `OpenMPCaptureLevel` in `ScopeInfo.h`. > I wrote those changes for this patch first, as can be seen in phabricator > history. I needed them for the oth

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D66397#1639185 , @xbolva00 wrote: > I agree. And I think they should just use const int instead of macros after > all. > > Maybe we should just improve silence hint if rhs is macro? > #define ALPHA_OFFSET 0x3 ? I don't

[PATCH] D62571: Implement codegen for MSVC unions with reference members

2019-08-21 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, thank you! I think this is actually needed to properly support MFC on Windows, IIRC. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62571/new/ https://reviews.llvm

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 216399. xbolva00 added a comment. Fixed review nits. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 Files: lib/Sema/SemaExpr.cpp test/SemaCXX/warn-xor-as-pow.cpp Index: test/SemaCXX/warn-xor-as-pow.cp

[PATCH] D66538: [AST] AST structural equivalence to work internally with pairs.

2019-08-21 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a project: clang. The structural equivalence check stores now pairs of nodes in the 'from' and 'to' context instead of only the node in 'from' context

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. I fixed and enabled this checker to warn for macros too. @aaron.ballman is right. Yes, as he said... If the user has a time to add -Wno-xor to build systems, he/she has also time to improve code readability and use hexadecimal literals. But I am a bit worried that

[PATCH] D62131: [ASTImporter] Remove NonEquivalentDecls from ASTImporter

2019-08-21 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. A "quick fix" for the problem: https://reviews.llvm.org/D66538 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62131/new/ https://reviews.llvm.org/D62131 ___ cfe-commits mailing

[PATCH] D36562: [Bitfield] Make the bitfield a separate location if it has width of legal integer type and its bit offset is naturally aligned for the type

2019-08-21 Thread Momchil Velikov via Phabricator via cfe-commits
chill added a comment. Herald added a project: LLVM. Shouldn't we disable `OPT_ffine_grained_bitfield_accesses` only if TSAN is active? Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D36562/new/ https://reviews.llvm.org/D36562 ___

r369536 - clang: Fix typo in comment

2019-08-21 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Aug 21 08:37:27 2019 New Revision: 369536 URL: http://llvm.org/viewvc/llvm-project?rev=369536&view=rev Log: clang: Fix typo in comment Modified: cfe/trunk/lib/Basic/FileManager.cpp Modified: cfe/trunk/lib/Basic/FileManager.cpp URL: http://llvm.org/viewvc/llvm-project/

r369539 - clang: Fix typo in comment

2019-08-21 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Aug 21 08:41:29 2019 New Revision: 369539 URL: http://llvm.org/viewvc/llvm-project?rev=369539&view=rev Log: clang: Fix typo in comment Modified: cfe/trunk/lib/Lex/UnicodeCharSets.h Modified: cfe/trunk/lib/Lex/UnicodeCharSets.h URL: http://llvm.org/viewvc/llvm-project/

r369540 - clang: Fix typo in comment

2019-08-21 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Aug 21 08:49:21 2019 New Revision: 369540 URL: http://llvm.org/viewvc/llvm-project?rev=369540&view=rev Log: clang: Fix typo in comment (Sorry for all these commits; trying to sort out why svn doesn't want to store my password.) Modified: cfe/trunk/lib/Sema/SemaOverload

r369542 - clang: Fix typo in comment

2019-08-21 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Aug 21 08:52:44 2019 New Revision: 369542 URL: http://llvm.org/viewvc/llvm-project?rev=369542&view=rev Log: clang: Fix typo in comment Modified: cfe/trunk/lib/Sema/SemaObjCProperty.cpp Modified: cfe/trunk/lib/Sema/SemaObjCProperty.cpp URL: http://llvm.org/viewvc/llvm-

[PATCH] D66486: [LifetimeAnalysis] Detect more cases when the address of a local variable escapes

2019-08-21 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun marked an inline comment as done. xazax.hun added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6775 +if (!pathOnlyInitializesGslPointer(Path)) + Init = const_cast(Init->skipRValueSubobjectAdjustments()); gribozavr wrote: > I'm afr

[PATCH] D66541: [clangd] Send highlighting diff beyond the end of the file.

2019-08-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: jvikstrom. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. This would make the client life (tracking the changes) easier. Repository: rG LLVM Github Monorepo https://reviews.ll

[PATCH] D66381: [analyzer] Enable control dependency condition tracking by default

2019-08-21 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 216418. Szelethus added a comment. Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66381/new/ https://reviews.llvm.org/D66381 Files: clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def clang/test/Analysis/analyzer-config.c cla

[PATCH] D65725: [analyzer] Mention whether an event is about a condition in a bug report part 2

2019-08-21 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 216421. Szelethus added a comment. Rebase. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65725/new/ https://reviews.llvm.org/D65725 Files: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp clang/test/Analysis/track-control-dependency-cond

[PATCH] D66179: [LifetimeAnalysis] Support more STL idioms (template forward declaration and DependentNameType)

2019-08-21 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:6627 const auto *Ctor = CCE->getConstructor(); const CXXRecordDecl *RD = Ctor->getParent()->getCanonicalDecl(); if (CCE->getNumArgs() > 0 && RD->hasAttr()) You can also remove

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 216420. jdenny edited the summary of this revision. jdenny set the repository for this revision to rG LLVM Github Monorepo. jdenny added a comment. As requested, backed out the changes related to firstprivate scalars, and updated tests. Repository: rG LLVM

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D66397#1639376 , @xbolva00 wrote: > I fixed and enabled this checker to warn for macros too. > > @aaron.ballman is right. Yes, as he said... If the user has a time to add > -Wno-xor to build systems, he/she has also t

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 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: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65835/new/ https://reviews.llvm.org/D65835 ___

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. I want to be sure we're on the same page. Due to the changes I just backed out, the following two examples now generate different code: int a = 0; #pragma omp target map(a) #pragma omp teams firstprivate(a) ; int a = 0; #pragma omp target teams firstpriv

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev requested changes to this revision. ABataev added a comment. This revision now requires changes to proceed. Need to fix the mapping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65835/new/ https://reviews.llvm.org/D65835

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D65835#1639584 , @jdenny wrote: > I want to be sure we're on the same page. Due to the changes I just backed > out, the following two examples now generate different code: > > int a = 0; > #pragma omp target map(a) > #pr

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. But it seems everything is autogenerated and nothing is “custom message”. Any custom change is removed by next autogeneration. Possibly @hans could tell us if there is a way CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D65835#1639585 , @ABataev wrote: > In D65835#1639584 , @jdenny wrote: > > > I want to be sure we're on the same page. Due to the changes I just backed > > out, the following two examples

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D65835#1639593 , @jdenny wrote: > In D65835#1639585 , @ABataev wrote: > > > In D65835#1639584 , @jdenny wrote: > > > > > I want to be sure we're o

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D65835#1639612 , @ABataev wrote: > In D65835#1639593 , @jdenny wrote: > > > In D65835#1639585 , @ABataev wrote: > > > > > In D65835#1639584

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D65835#1639617 , @jdenny wrote: > In D65835#1639612 , @ABataev wrote: > > > In D65835#1639593 , @jdenny wrote: > > > > > In D65835#1639585

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D66397#1639590 , @xbolva00 wrote: > But it seems everything is autogenerated and nothing is “custom message”. Any > custom change is removed by next autogeneration. > > Possibly @hans could tell us if there is a way The

[PATCH] D53476: [clang-cl] Allowed -fopenmp work and link openmp library from per-runtime library directory

2019-08-21 Thread Isuru Fernando via Phabricator via cfe-commits
isuruf added a comment. Herald added a reviewer: jdoerfert. Herald added a project: clang. Was this patch merged in clang? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53476/new/ https://reviews.llvm.org/D53476 ___

r369550 - [LTO] Always mark regular LTO units with EnableSplitLTOUnit=1 under the new pass manager

2019-08-21 Thread Leonard Chan via cfe-commits
Author: leonardchan Date: Wed Aug 21 10:24:14 2019 New Revision: 369550 URL: http://llvm.org/viewvc/llvm-project?rev=369550&view=rev Log: [LTO] Always mark regular LTO units with EnableSplitLTOUnit=1 under the new pass manager Match the behavior of D65009 under the new pass manager. This address

[PATCH] D66488: [LTO] Always mark regular LTO units with EnableSplitLTOUnit=1 under the new pass manager

2019-08-21 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369550: [LTO] Always mark regular LTO units with EnableSplitLTOUnit=1 under the new… (authored by leonardchan, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Change

[PATCH] D65724: [analyzer] Don't make ConditionBRVisitor events prunable when the condition is an interesting field

2019-08-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65724/new/ https://reviews.llvm.org/D65724 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D66381: [analyzer] Enable control dependency condition tracking by default

2019-08-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. The code looks good and there seems to be a lot of test coverage :] CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66381/new/ https://reviews.llvm.org/D66381 _

[PATCH] D62829: [clang-tidy] Check for dynamically initialized statics in headers.

2019-08-21 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Since Charlie has completed his internship before LGTM, I'll commit this on his behalf. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62829/new/ https://reviews.llvm.org/D62829 ___ cfe-commits mailing list cfe-commit

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D65835#1639622 , @ABataev wrote: > We don't need this new level counter to correctly handle this situation. Just > check for the combined target directive in `Sema::isOpenMPCapturedByRef` and > return true if it is mapped as to

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. In D66397#1635792 , @aaron.ballman wrote: > In D66397#1635745 , @xbolva00 wrote: > > > I think it is too soon to jump and disable all macros. We still catch all > > motivating cases, it fou

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D65835#1639685 , @jdenny wrote: > In D65835#1639622 , @ABataev wrote: > > > We don't need this new level counter to correctly handle this situation. > > Just check for the combined targe

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/test/Analysis/cast-value-state-dump.cpp:30 + if (dyn_cast_or_null(C)) { +// expected-note@-1 {{Assuming dynamic cast from 'Circle' to 'Triangle' fails}} +// expected-note@-2 {{Taking false branch}} Charusso w

[PATCH] D66423: [analyzer] CastValueChecker: Model isa(), isa_and_nonnull()

2019-08-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. LGTM with one minor nit! Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:233-235 + std::string ObjectName = Lexer::getSourceText( + CharSourceRange::getTok

[PATCH] D63648: [Preprocessor] Honor absolute paths in diagnostics

2019-08-21 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Maybe we should just implement full /FC mode that affects paths everywhere (diagnostics, `__FILE__`, etc). Then people who need this more than deterministic, build-directory-independent builds can use that. (But it does break distributed build caching, so it's not that g

[PATCH] D66325: [analyzer] CastValueChecker: Store the dynamic types and casts

2019-08-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Thanks!! Here's the last couple of nits that i have. Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:83-93 +static QualType getRecordType(QualType Ty) { + Ty = Ty.getCanonicalType(); + + if (Ty->isPointerType()) +return getRecordTyp

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D66397#1639696 , @thakis wrote: > In D66397#1635792 , @aaron.ballman > wrote: > > > In D66397#1635745 , @xbolva00 > > wrote: > > > > > I t

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. In D65835#1639700 , @ABataev wrote: > Chwck 2 ifs: `if (IsVariableUsedInMapClause)` and the second `if (IsByRef && > Ty.getNonReferenceType()->isScalarType())`. If the variable is mapped, > `IsByRef` is set to `true`, but later it

[PATCH] D65239: [analyzer] RangeConstraintManager: Apply constraint ranges of bitwise operations

2019-08-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:503 + + if (!BinaryOperator::isBitwiseOrShiftOp(SIE->getOpcode())) +return State; I suspect we have problems with bitwise OR here, which (unlike other bitwise/sh

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. I also strongly -1 to disabling the warning for macros. It's just a disservice to everyone, and the fact there's precedent doesn't mean it's the right solution. That being said, does using C++14 binary literals also silence the diag? It should. CHANGES SINCE LAST A

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. >> I think I missed the workaround. I only saw the suggestion to write 0x2 >> instead of 2 which doesn't seem more clear at all to me. Was there another >> fix suggestion? > > Nope, you didn't miss it -- that was the suggestion. Using a hex notation is > the way we let

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D65835#1639739 , @jdenny wrote: > In D65835#1639700 , @ABataev wrote: > > > Chwck 2 ifs: `if (IsVariableUsedInMapClause)` and the second `if (IsByRef > > && Ty.getNonReferenceType()->isS

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D66397#1639749 , @thakis wrote: > >> I think I missed the workaround. I only saw the suggestion to write 0x2 > >> instead of 2 which doesn't seem more clear at all to me. Was there another > >> fix suggestion? > > > > N

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> C++14 binary literals Thanks, noted. >> Suggest “xor” We could. Aaron what do you think? But I still like “0x” more. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 __

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny updated this revision to Diff 216444. jdenny edited the summary of this revision. jdenny added a comment. Restore previous version of patch, and rebase. I tried, and this patch is not sufficient to fix PR40253. If there are indeed common changes, it seems it's just as well to put them he

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Could the following text be acceptable? replace expression with '0xA ^ 1' or ‘10 xor 1’ to silence this warning (In C mode without xor macro “replace expression with '0xA ^ 1' to silence this warning”) I am not fan of “the ‘xor’ alternative token” CHANGES SINCE LAST

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. The `ALPHA_OFFSET` code seems to be unnecessarily "clever" to me. I think the warning can be suppressed by reversing the operands: `ALPHA_OFFSET ^ 2` But if I were maintaining that code I would get rid of the xor hack entirely and use #define CHANNEL_OFFSET(i) (i) o

[PATCH] D65723: [analyzer][NFC] Add different interestingness kinds

2019-08-21 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked an inline comment as done. Szelethus added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h:92-101 /// Default tracking kind -- specifies that as much information should be /// gathered about the tracke

[PATCH] D64695: [clang-format] Modified SortIncludes and IncludeCategories to priority for sorting #includes within the Group Category.

2019-08-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D64695#1614386 , @MyDeveloperDay wrote: > Assuming this works and the other unit tests don't show issues then this LGTM. > Please consider running this on your NetBSD code base before committing, if > possible please al

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Sema/ScopeInfo.h:763 RecordDecl *RD, ImplicitParamDecl *Context, CapturedRegionKind K, unsigned OpenMPLevel) : CapturingScopeInfo(Diag, ImpCap_CapturedRegio

[PATCH] D64695: [clang-format] Modified SortIncludes and IncludeCategories to priority for sorting #includes within the Group Category.

2019-08-21 Thread Manikishan Ghantasala via Phabricator via cfe-commits
Manikishan added a comment. In D64695#1614386 , @MyDeveloperDay wrote: > Assuming this works and the other unit tests don't show issues then this > LGTM. Please consider running this on your NetBSD code base before > committing, if possible please also

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Swap trick is cool, we can suggest it always(vs. ‘xor’) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66397/new/ https://reviews.llvm.org/D66397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[clang-tools-extra] r369568 - [clang-tidy] Check for dynamically initialized statics in headers.

2019-08-21 Thread Yuanfang Chen via cfe-commits
Author: yuanfang Date: Wed Aug 21 13:00:01 2019 New Revision: 369568 URL: http://llvm.org/viewvc/llvm-project?rev=369568&view=rev Log: [clang-tidy] Check for dynamically initialized statics in headers. Finds instances where variables with static storage are initialized dynamically in header file

[PATCH] D62829: [clang-tidy] Check for dynamically initialized statics in headers.

2019-08-21 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369568: [clang-tidy] Check for dynamically initialized statics in headers. (authored by yuanfang, committed by ). Herald added a project: LLVM. Changed prior to commit: https://reviews.llvm.org/D62829?v

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny marked an inline comment as done. jdenny added inline comments. Comment at: clang/lib/Sema/Sema.cpp:2108 void Sema::PushCapturedRegionScope(Scope *S, CapturedDecl *CD, RecordDecl *RD, CapturedRegionKind K) { + CapturedRegionScopeInfo *

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/Sema.cpp:2108 void Sema::PushCapturedRegionScope(Scope *S, CapturedDecl *CD, RecordDecl *RD, CapturedRegionKind K) { + CapturedRegionScopeInfo *CSI = new CapturedRegionScopeInfo( -

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/Sema.cpp:2108 void Sema::PushCapturedRegionScope(Scope *S, CapturedDecl *CD, RecordDecl *RD, CapturedRegionKind K) { + CapturedRegionScopeInfo *CSI = new CapturedRegionScopeInfo( -

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny marked an inline comment as done. jdenny added inline comments. Comment at: clang/lib/Sema/Sema.cpp:2108 void Sema::PushCapturedRegionScope(Scope *S, CapturedDecl *CD, RecordDecl *RD, CapturedRegionKind K) { + CapturedRegionScopeInfo *

[PATCH] D66397: [Diagnostics] Improve -Wxor-used-as-pow

2019-08-21 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. In D66397#1639840 , @xbolva00 wrote: > Swap trick is cool, we can suggest it always(vs. ‘xor’) Well, you should avoid suggesting that the user rewrite `2 ^ 10` as `10 ^ 2`. Anyway, I think some of the observers here might be

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/Sema.cpp:2108 void Sema::PushCapturedRegionScope(Scope *S, CapturedDecl *CD, RecordDecl *RD, CapturedRegionKind K) { + CapturedRegionScopeInfo *CSI = new CapturedRegionScopeInfo( -

  1   2   >