[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D63423#1550697 , @jfb wrote: > What I meant with macros was that I don't think we should warn on: > > #define LEGIT(a, b) ({ work work work; a ^ b; work work work; }) > > LEGIT(10, 5); > > > If the constants are inline in

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D63423#1550705 , @aaron.ballman wrote: > In D63423#1550697 , @jfb wrote: > > > What I meant with macros was that I don't think we should warn on: > > > > #define LEGIT(a, b) ({ work work w

[PATCH] D63533: [analyzer] Fix clang-tidy crash on GCCAsmStmt

2019-06-19 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:401 + case Stmt::GCCAsmStmtClass: +return; } NoQ wrote: > Please add a TODO to actually implement this functionality. And an `assert` that this `Stmt

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread John Regehr via Phabricator via cfe-commits
regehr added a comment. I am also in the "be a bit conservative at first and see how things shake out" camp, but it's y'all doing the hard work here, not me :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ https://reviews.llvm.org/D63423 __

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 205641. xbolva00 added a comment. Reverted macro support. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ https://reviews.llvm.org/D63423 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Okey, it should be fine now. If you are agree with the current state, please approve it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ https://reviews.llvm.org/D63423 ___ cfe-commits mailing list cfe-co

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. I've always been frustrated at how clang just gives up as soon as it sees a macro. At best that should be controlled with some command-line flag. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ https://reviews.llvm.org/D63423

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D63423#1550725 , @lebedev.ri wrote: > I've always been frustrated at how clang just gives up as soon as it sees a > macro. > At best that should be controlled with some command-line flag. This patch is not the place to change co

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D63423#1550725 , @lebedev.ri wrote: > I've always been frustrated at how clang just gives up as soon as it sees a > macro. > At best that should be controlled with some command-line flag. I cannot promise nothing, but maybe

[PATCH] D62960: SVE opaque type for C intrinsics demo

2019-06-19 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added inline comments. Comment at: lib/AST/ItaniumMangle.cpp:2680 +break; +#include "clang/Basic/AArch64SVEACLETypes.def" } rsandifo-arm wrote: > erik.pilkington wrote: > > jfb wrote: > > > @rjmccall you probably should review this part. >

[PATCH] D62738: [HIP] Support device_shadow variable

2019-06-19 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Overall looks good. Thank you for making the change. While reviewing the patch it occured to me that it presents an opportunity to generalize the shadow variables to work in both directions. See below. Comment at: include/clang/Basic/AttrDocs.td:4164-4171

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D63423#1550728 , @jfb wrote: > In D63423#1550725 , @lebedev.ri > wrote: > > > I've always been frustrated at how clang just gives up as soon as it sees a > > macro. > > At best that

[PATCH] D63533: [analyzer] Fix clang-tidy crash on GCCAsmStmt

2019-06-19 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry updated this revision to Diff 205642. Nathan-Huckleberry added a comment. - [analyzer] Revise test case and add TODO Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63533/new/ https://reviews.llvm.org/D63533 Files: clang/lib/Sta

[PATCH] D63277: [CUDA][HIP] Don't set "comdat" attribute for CUDA device stub functions.

2019-06-19 Thread Konstantin Pyzhov via Phabricator via cfe-commits
kpyzhov added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4294 setNonAliasAttributes(GD, Fn); SetLLVMFunctionAttributesForDefinition(D, Fn); if (const ConstructorAttr *CA = D->getAttr()) tra wrote: > Perhaps this should be pushed fur

[PATCH] D63535: [clang][AST] ASTNameGenerator: A refactoring of CodegenNameGeneratorImpl (NFC).

2019-06-19 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 205643. plotfi added a comment. Update to address @aaron.ballman's catch that ASTNameGenerator was not private enough. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63535/new/ https://reviews.llvm.org/D63535 F

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D63423#1550713 , @jfb wrote: > In D63423#1550705 , @aaron.ballman > wrote: > > > In D63423#1550697 , @jfb wrote: > > > > > What I meant wit

[PATCH] D61552: [clang] Adapt ASTMatcher to explicit(bool) specifier

2019-06-19 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 205645. Tyker marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61552/new/ https://reviews.llvm.org/D61552 Files: clang/docs/LibASTMatchersReference.html clang/include/clang/AST/DeclCXX.h clang/include/clang/ASTMatch

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 205646. xbolva00 added a comment. Added dots in the comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ https://reviews.llvm.org/D63423 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> Perhaps the author can run the check over a large corpus of code to see >> whether fps come up in practice? (The presence of fps will suggest to not >> warn in macros, but the absence of fps won't tell us too much.) Sorry, I have no time nor spare computers to check

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-06-19 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 205647. lildmh marked 3 inline comments as done. lildmh added a comment. Fix mapper function name mangling CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 Files: include/clang/AST/GlobalDecl.h lib/AST/AST

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-06-19 Thread Lingda Li via Phabricator via cfe-commits
lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, arg_base, arg_begin, ABata

r363855 - [clang] Adapt ASTMatcher to explicit(bool) specifier

2019-06-19 Thread Gauthier Harnisch via cfe-commits
Author: tyker Date: Wed Jun 19 11:27:56 2019 New Revision: 363855 URL: http://llvm.org/viewvc/llvm-project?rev=363855&view=rev Log: [clang] Adapt ASTMatcher to explicit(bool) specifier Summary: Changes: - add an ast matcher for deductiong guide. - allow isExplicit matcher for deductiong guide.

[PATCH] D63361: Pretend NRVO variables are references so they can be found by debug info

2019-06-19 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 205649. akhuang added a comment. - Add clang and llvm tests, and windows debuginfo test - Use GEP as returnValuePointer in inalloca case - Add bool parameter for EmitDeclare when pointer is being used Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D63361: Pretend NRVO variables are references so they can be found by debug info

2019-06-19 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked an inline comment as done. akhuang added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:908 --EI; llvm::Value *Addr = Builder.CreateStructGEP(nullptr, &*EI, Idx); Addr = Builder.CreateAlignedLoad(Addr, getPointerAlign(), "agg.resu

[PATCH] D61552: [clang] Adapt ASTMatcher to explicit(bool) specifier

2019-06-19 Thread Tyker via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363855: [clang] Adapt ASTMatcher to explicit(bool) specifier (authored by Tyker, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://r

[PATCH] D63108: [OpenMP] Add support for handling declare target to clause when unified memory is required

2019-06-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:2297-2319 +static Address emitDeclTargetToVarDeclLValue(CodeGenFunction &CGF, + const VarDecl *VD, QualType T) { + llvm::Optional Res = + OMPDeclareTargetDeclAttr::

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D63423#1550768 , @xbolva00 wrote: > >> Perhaps the author can run the check over a large corpus of code to see > >> whether fps come up in practice? (The presence of fps will suggest to not > >> warn in macros, but the a

[PATCH] D63369: [AST] Fixed extraneous warnings for binary conditional operator

2019-06-19 Thread Nathan Huckleberry via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363857: [AST] Fixed extraneous warnings for binary conditional operator (authored by Nathan-Huckleberry, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prio

[PATCH] D63535: [clang][AST] ASTNameGenerator: A refactoring of CodegenNameGeneratorImpl (NFC).

2019-06-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM with a few nits. Comment at: clang/include/clang/AST/Mangle.h:253 +public: + ASTNameGenerator(ASTContext &Ctx); + bool writeName(const Decl *D, raw_ostream &OS); Slight preference to ma

r363857 - [AST] Fixed extraneous warnings for binary conditional operator

2019-06-19 Thread Nathan Huckleberry via cfe-commits
Author: nathan-huckleberry Date: Wed Jun 19 11:37:01 2019 New Revision: 363857 URL: http://llvm.org/viewvc/llvm-project?rev=363857&view=rev Log: [AST] Fixed extraneous warnings for binary conditional operator Summary: Binary conditional operator gave warnings where ternary operators did not. They

[PATCH] D63535: [clang][AST] ASTNameGenerator: A refactoring of CodegenNameGeneratorImpl (NFC).

2019-06-19 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked 3 inline comments as done. plotfi added inline comments. Comment at: clang/lib/AST/Mangle.cpp:25 #include "llvm/ADT/StringExtras.h" +#include "llvm/IR/Mangler.h" #include "llvm/Support/ErrorHandling.h" aaron.ballman wrote: > Do we have to link in

[PATCH] D63361: Pretend NRVO variables are references so they can be found by debug info

2019-06-19 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I see we don't have any tests for inalloca to model this on, so I think we should skip that for this change. I'll add one later that handles arguments as well, since those are interesting. Comment at: clang/lib/CodeGen/CGDecl.cpp:1564 +Address DebugAd

[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

2019-06-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, arg_base, arg_begin, lild

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. David Malcon - GCC: “I think we'd want to *not* warn if either of the operands are from a macro expansion.“ But I see no reason to follow this and why we should restrict this even more.. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ https://reviews

[PATCH] D63518: WIP BitStream reader: propagate errors

2019-06-19 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. Hi JF. Thanks for working on this, nice improvement to error handling! The overall approach is pretty solid and should prevent a lot of red herring while investigating hard to reproduce crashes in clang, specially when implicit clang modules is involved. Dropping the erro

r363859 - Switching this test to use output generated by script; NFC.

2019-06-19 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Wed Jun 19 12:07:52 2019 New Revision: 363859 URL: http://llvm.org/viewvc/llvm-project?rev=363859&view=rev Log: Switching this test to use output generated by script; NFC. Modified: cfe/trunk/test/AST/ast-dump-if-json.cpp Modified: cfe/trunk/test/AST/ast-dump-if-js

r363866 - Dump the value calculated by a constant expression when dumping the AST to JSON.

2019-06-19 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Wed Jun 19 12:12:22 2019 New Revision: 363866 URL: http://llvm.org/viewvc/llvm-project?rev=363866&view=rev Log: Dump the value calculated by a constant expression when dumping the AST to JSON. Modified: cfe/trunk/include/clang/AST/JSONNodeDumper.h cfe/trunk/lib/

[PATCH] D59744: Fix i386 ABI "__m64" type bug

2019-06-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. -O0 always inline isn't working because the frontend is emitting a store of vector type to memory then a load of x86_mmx to do the type coercion. The caller does the opposite to coerce back from mmx. This -O0 pipeline isn't capable of getting rid of these redundant

[PATCH] D63508: make -frewrite-includes handle __has_include wrapped in a macro

2019-06-19 Thread Luboš Luňák via Phabricator via cfe-commits
llunak added a comment. In D63508#1550668 , @rsmith wrote: > Perhaps we should rewrite all `#if`-like directives to `#if 0` or `#if 1`? I think that would work too and it'd be in fact a reliable simple solution. Repository: rC Clang CHANGES SINCE LA

[PATCH] D63277: [CUDA][HIP] Don't set "comdat" attribute for CUDA device stub functions.

2019-06-19 Thread Konstantin Pyzhov via Phabricator via cfe-commits
kpyzhov updated this revision to Diff 205655. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63277/new/ https://reviews.llvm.org/D63277 Files: clang/lib/CodeGen/CodeGenModule.cpp Index: clang/lib/CodeGen/CodeGenModule.cpp ===

[PATCH] D63277: [CUDA][HIP] Don't set "comdat" attribute for CUDA device stub functions.

2019-06-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. This optimization is disabled for functions not in COMDAT sections? Is that documented somewhere? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63277/new/ https://reviews.llvm.org/D63277 ___ cfe-commits mailing l

[PATCH] D57450: [RISCV] Set MaxAtomicInlineWidth and MaxAtomicPromoteWidth for RV32/RV64 targets with atomics

2019-06-19 Thread John LLVM via Phabricator via cfe-commits
JohnLLVM added a comment. Herald added subscribers: Jim, benna, psnobl, dexonsmith. @asb: Gentle ping on this. I would really like to avoid atomics libcalls in order to make proper llvm benchmarks. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57450/new/ https:

r363869 - Print out the union field being initialized by an InitListExpr when dumping the AST to JSON.

2019-06-19 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Wed Jun 19 12:40:07 2019 New Revision: 363869 URL: http://llvm.org/viewvc/llvm-project?rev=363869&view=rev Log: Print out the union field being initialized by an InitListExpr when dumping the AST to JSON. Modified: cfe/trunk/include/clang/AST/JSONNodeDumper.h c

r363871 - Reapply "r363684: AMDGPU: Add GWS instruction builtins"

2019-06-19 Thread Matt Arsenault via cfe-commits
Author: arsenm Date: Wed Jun 19 12:55:49 2019 New Revision: 363871 URL: http://llvm.org/viewvc/llvm-project?rev=363871&view=rev Log: Reapply "r363684: AMDGPU: Add GWS instruction builtins" Modified: cfe/trunk/include/clang/Basic/BuiltinsAMDGPU.def cfe/trunk/test/CodeGenOpenCL/builtins-amd

r363873 - Print whether a generic selection expression is result dependent when dumping the AST to JSON.

2019-06-19 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Wed Jun 19 13:16:55 2019 New Revision: 363873 URL: http://llvm.org/viewvc/llvm-project?rev=363873&view=rev Log: Print whether a generic selection expression is result dependent when dumping the AST to JSON. Modified: cfe/trunk/include/clang/AST/JSONNodeDumper.h

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-06-19 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon updated this revision to Diff 205663. Fznamznon added a comment. Appled part of comments from @aaron.ballman: - Fixed grammar and code style in all places except sycl_kernel docs - Added a lit test which checks that sycl_device attribute implicitly added to proper declarations Reposi

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-06-19 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:263-264 +entry point to device code i.e. will be called by host in run time. +Here is a code example of the SYCL program, which demonstrates the need for +this attribute: +.. code-block:: c++ -

r363878 - [clang][AST] ASTNameGenerator: A refactoring of CodegenNameGeneratorImpl (NFC).

2019-06-19 Thread Puyan Lotfi via cfe-commits
Author: zer0 Date: Wed Jun 19 13:51:35 2019 New Revision: 363878 URL: http://llvm.org/viewvc/llvm-project?rev=363878&view=rev Log: [clang][AST] ASTNameGenerator: A refactoring of CodegenNameGeneratorImpl (NFC). This is a NFC refactor move of CodegenNameGeneratorImpl from clang::Index to clang:AST

[PATCH] D63535: [clang][AST] ASTNameGenerator: A refactoring of CodegenNameGeneratorImpl (NFC).

2019-06-19 Thread Puyan Lotfi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363878: [clang][AST] ASTNameGenerator: A refactoring of CodegenNameGeneratorImpl (NFC). (authored by zer0, committed by ). Herald added subscribers: llvm-commits, mgorny. Herald added a project: LLVM. Cha

[PATCH] D63533: [analyzer] Fix clang-tidy crash on GCCAsmStmt

2019-06-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/test/Analysis/egraph-asm-goto-no-crash.cpp:1 +// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-dump-egraph=%t.dot %s +// RUN: cat %t.dot | FileCheck %s Ugh, you picked an exotic test as an example. Let's t

[PATCH] D63533: [analyzer] Fix clang-tidy crash on GCCAsmStmt

2019-06-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/test/Analysis/egraph-asm-goto-no-crash.cpp:1 +// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-dump-egraph=%t.dot %s +// RUN: cat %t.dot | FileCheck %s NoQ wrote: > Ugh, you picked an exotic test as an exam

[PATCH] D63533: [analyzer] Fix clang-tidy crash on GCCAsmStmt

2019-06-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/test/Analysis/egraph-asm-goto-no-crash.cpp:1 +// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-dump-egraph=%t.dot %s +// RUN: cat %t.dot | FileCheck %s NoQ wrote: > NoQ wrote: > > Ugh, you picked an exotic

[PATCH] D63533: [analyzer] Fix clang-tidy crash on GCCAsmStmt

2019-06-19 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/test/Analysis/egraph-asm-goto-no-crash.cpp:1 +// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-dump-egraph=%t.dot %s +// RUN: cat %t.dot | FileCheck %s NoQ wrote: > NoQ wrote: > > NoQ wrote: > >

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-06-19 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: clang/test/SemaSYCL/device-attributes.cpp:3 + +[[clang::sycl_kernel]] int gv2 = 0; // expected-warning {{'sycl_kernel' attribute only applies to functions}} +__attribute((sycl_kernel)) int gv3 = 0; // expected-warning {{'sycl_kernel' att

[PATCH] D63533: [analyzer] Fix clang-tidy crash on GCCAsmStmt

2019-06-19 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:401 + case Stmt::GCCAsmStmtClass: +return; } nickdesaulniers wrote: > NoQ wrote: > > Please add a TODO to actually implement this functionality. > An

[PATCH] D63108: [OpenMP] Add support for handling declare target to clause when unified memory is required

2019-06-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea updated this revision to Diff 205667. gtbercea marked an inline comment as done. gtbercea added a comment. - Merge MT_Link and MT_To with unified memory cases. - Transform switch into if statements. - Fix declare target attribute checks. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D63108: [OpenMP] Add support for handling declare target to clause when unified memory is required

2019-06-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
gtbercea added a comment. Still need to update the test but the rest of the code is updated. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63108/new/ https://reviews.llvm.org/D63108 ___ cfe-commits mailing list cfe-c

[PATCH] D63325: [Support][Time profiler] Make FE codegen blocks to be inside frontend blocks

2019-06-19 Thread Anton Afanasyev via Phabricator via cfe-commits
anton-afanasyev updated this revision to Diff 205673. anton-afanasyev added a comment. Updated, changed test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63325/new/ https://reviews.llvm.org/D63325 Files: clang/lib/CodeGen/CodeGenAction.cpp cl

[PATCH] D63518: WIP BitStream reader: propagate errors

2019-06-19 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D63518#1550827 , @bruno wrote: > Hi JF. Thanks for working on this, nice improvement to error handling! > > The overall approach is pretty solid and should prevent a lot of red herring > while investigating hard to reproduce crashe

[PATCH] D63533: [analyzer] Fix clang-tidy crash on GCCAsmStmt

2019-06-19 Thread Nathan Huckleberry via Phabricator via cfe-commits
Nathan-Huckleberry marked an inline comment as done. Nathan-Huckleberry added inline comments. Comment at: clang/test/Analysis/egraph-asm-goto-no-crash.cpp:1 +// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-dump-egraph=%t.dot %s +// RUN: cat %t.dot | FileCheck %s ---

[PATCH] D63575: [WebAssembly] Add builtin functions for creating vector constants

2019-06-19 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added reviewers: dschuff, aheejin. Herald added subscribers: cfe-commits, sunfish, jgravelle-google, sbc100. Herald added a project: clang. These builtins do not offer any functionality over the normal aggregate initialization for vector types, except that th

[PATCH] D63082: [Diagnostics] Added support for -Wint-in-bool-context

2019-06-19 Thread Arnaud Bienner via Phabricator via cfe-commits
ArnaudBienner added inline comments. Comment at: lib/Sema/SemaChecking.cpp:11103 + + if (auto *BO = dyn_cast(E)) { +BinaryOperator::Opcode Opc = BO->getOpcode(); Shouldn't that be "const auto*" instead? I'm surprised dyn_cast casts away const qualifier, but

[PATCH] D60974: Clang IFSO driver action.

2019-06-19 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 205686. plotfi added a comment. This should address the shared lib issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60974/new/ https://reviews.llvm.org/D60974 Files: clang/include/clang/Basic/DiagnosticFr

[PATCH] D63577: [clang][NewPM] Move EntryExitInstrumenterPass to the start of the pipeline

2019-06-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: chandlerc, phosek, echristo, serge-sans-paille. leonardchan added a project: clang. This fixes `CodeGen/x86_64-instrument-functions.c` when running under the new pass manager. The pass should go before any other pass to prevent `__c

[PATCH] D63423: [Diagnostics] Diagnose misused xor as pow

2019-06-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 205692. xbolva00 added a comment. Improved code, added const. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63423/new/ https://reviews.llvm.org/D63423 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D63578: AMDGPU: Add DS GWS sema builtins

2019-06-19 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: rampitec, b-sumner, yaxunl. Herald added subscribers: t-tye, tpr, dstuttard, nhaehnle, wdng, jvesely, kzhuravl. arsenm added a parent revision: D63576: AMDGPU: Add intrinsics for DS GWS semaphore instructions. https://reviews.llvm.org/D63578

[PATCH] D63533: [analyzer] Fix clang-tidy crash on GCCAsmStmt

2019-06-19 Thread Tom Roeder via Phabricator via cfe-commits
tmroeder added a comment. I can confirm that this fixes the clang-tidy crash I observed in trying to analyze the kernel. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63533/new/ https://reviews.llvm.org/D63533 __

[PATCH] D61809: [BPF] Preserve debuginfo array/union/struct type/access index

2019-06-19 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song marked an inline comment as done. yonghong-song added a comment. @eli.friedman Sorry for replying late. I am outside US and currently in PTO. Will back to US soon to address your comments. > can we really expect the user to know which expressions to apply this to? Yes, this is spe

[PATCH] D63533: [analyzer] Fix clang-tidy crash on GCCAsmStmt

2019-06-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:401 + case Stmt::GCCAsmStmtClass: +return; } nickdesaulniers wrote: > nickdesaulniers wrote: > > NoQ wrote: > > > Please add a TODO to actually implement th

[PATCH] D63316: [clangd] Include the diagnostics's code when comparing diagnostics

2019-06-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 205694. nridge added a comment. Add requested test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63316/new/ https://reviews.llvm.org/D63316 Files: clang-tools-extra/clangd/Protocol.h clang-tools-extra/

[PATCH] D63316: [clangd] Include the diagnostics's code when comparing diagnostics

2019-06-19 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363889: [clangd] Include the diagnostics's code when comparing diagnostics (authored by nridge, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to comm

[clang-tools-extra] r363889 - [clangd] Include the diagnostics's code when comparing diagnostics

2019-06-19 Thread Nathan Ridge via cfe-commits
Author: nridge Date: Wed Jun 19 16:11:02 2019 New Revision: 363889 URL: http://llvm.org/viewvc/llvm-project?rev=363889&view=rev Log: [clangd] Include the diagnostics's code when comparing diagnostics Summary: This fixes https://github.com/clangd/clangd/issues/60 Reviewers: kadircet Reviewed By:

[PATCH] D63575: [WebAssembly] Add builtin functions for creating vector constants

2019-06-19 Thread Thomas Lively via Phabricator via cfe-commits
tlively added a comment. This CL does not provide a mechanism for enforcing that the lanes of a floating point vector are constant, and it doesn't look like clang supports that kind of check. That makes this CL a half-baked solution, so I'm not sure we should actually go in this direction. Re

r363890 - [X86] Correct the __min_vector_width__ attribute on a few intrinsics.

2019-06-19 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed Jun 19 16:27:04 2019 New Revision: 363890 URL: http://llvm.org/viewvc/llvm-project?rev=363890&view=rev Log: [X86] Correct the __min_vector_width__ attribute on a few intrinsics. Modified: cfe/trunk/lib/Headers/avx512bwintrin.h cfe/trunk/lib/Headers/avx512vlintrin

[PATCH] D63082: [Diagnostics] Added support for -Wint-in-bool-context

2019-06-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 205696. xbolva00 added a comment. Addressed review notes. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63082/new/ https://reviews.llvm.org/D63082 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.t

r363891 - [analyzer] RetainCount: Add support for OSRequiredCast().

2019-06-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jun 19 16:33:34 2019 New Revision: 363891 URL: http://llvm.org/viewvc/llvm-project?rev=363891&view=rev Log: [analyzer] RetainCount: Add support for OSRequiredCast(). It's a new API for custom RTTI in Apple IOKit/DriverKit framework that is similar to OSDynamicCast() th

r363893 - [analyzer] NFC: Change evalCall() to provide a CallEvent.

2019-06-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jun 19 16:33:42 2019 New Revision: 363893 URL: http://llvm.org/viewvc/llvm-project?rev=363893&view=rev Log: [analyzer] NFC: Change evalCall() to provide a CallEvent. This changes the checker callback signature to use the modern, easy to use interface. Additionally, thi

r363894 - [analyzer] Fix JSON dumps for dynamic type information.

2019-06-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jun 19 16:33:45 2019 New Revision: 363894 URL: http://llvm.org/viewvc/llvm-project?rev=363894&view=rev Log: [analyzer] Fix JSON dumps for dynamic type information. They're now valid JSON. Differential Revision: https://reviews.llvm.org/D62716 Modified: cfe/trunk/

r363892 - [analyzer] DeadStores: Add a crude suppression files generated by DriverKit IIG.

2019-06-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jun 19 16:33:39 2019 New Revision: 363892 URL: http://llvm.org/viewvc/llvm-project?rev=363892&view=rev Log: [analyzer] DeadStores: Add a crude suppression files generated by DriverKit IIG. IIG is a replacement for MIG in DriverKit: IIG is autogenerating C++ code. Suppr

r363896 - [analyzer] Fix JSON dumps for store clusters.

2019-06-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jun 19 16:33:51 2019 New Revision: 363896 URL: http://llvm.org/viewvc/llvm-project?rev=363896&view=rev Log: [analyzer] Fix JSON dumps for store clusters. Include a unique pointer so that it was possible to figure out if it's the same cluster in different program states

r363895 - [analyzer] Fix JSON dumps for location contexts.

2019-06-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jun 19 16:33:48 2019 New Revision: 363895 URL: http://llvm.org/viewvc/llvm-project?rev=363895&view=rev Log: [analyzer] Fix JSON dumps for location contexts. Location context ID is a property of the location context, not of an item within it. It's useful to know the id

r363897 - [analyzer] exploded-graph-rewriter: Fix escaping StringRegions.

2019-06-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jun 19 16:33:55 2019 New Revision: 363897 URL: http://llvm.org/viewvc/llvm-project?rev=363897&view=rev Log: [analyzer] exploded-graph-rewriter: Fix escaping StringRegions. Quotes around StringRegions are now escaped and unescaped correctly, producing valid JSON. Addit

[PATCH] D63579: [clang-scan-deps] print the dependencies to stdout and remove the need to use -MD options in the CDB

2019-06-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: Bigcheese, aganea. Herald added subscribers: tschuett, dexonsmith, jkorous. Herald added a project: clang. The gathered dependencies are now printed to the STDOUT instead of being written to disk. The tool also doesn't need the dependency

[PATCH] D63117: [analyzer] RetainCount: Add support for OSRequiredCast().

2019-06-19 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL363891: [analyzer] RetainCount: Add support for OSRequiredCast(). (authored by dergachev, committed by ). Herald added a p

[PATCH] D63118: [analyzer] DeadStores: Add a crude suppression files generated by DriverKit IIG.

2019-06-19 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL363892: [analyzer] DeadStores: Add a crude suppression files generated by DriverKit IIG. (authored by dergachev, committed

r363898 - [analyzer] exploded-graph-rewriter: Implement a --diff mode.

2019-06-19 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Jun 19 16:33:59 2019 New Revision: 363898 URL: http://llvm.org/viewvc/llvm-project?rev=363898&view=rev Log: [analyzer] exploded-graph-rewriter: Implement a --diff mode. In this mode the tool would avoid duplicating the contents of the program state on every node, repla

[PATCH] D62440: [analyzer] NFC: Change evalCall() to provide a CallEvent.

2019-06-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363893: [analyzer] NFC: Change evalCall() to provide a CallEvent. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D62716: [analyzer] Fix JSON dumps for dynamic types, add test.

2019-06-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363894: [analyzer] Fix JSON dumps for dynamic type information. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: ht

[PATCH] D63362: [analyzer] Fix JSON dumps for store clusters.

2019-06-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363896: [analyzer] Fix JSON dumps for store clusters. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://revi

[PATCH] D62754: [analyzer] Fix JSON dumps for location contexts.

2019-06-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363895: [analyzer] Fix JSON dumps for location contexts. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://r

[PATCH] D63519: [analyzer] exploded-graph-rewriter: Fix escaping and unescaping of StringRegions.

2019-06-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363897: [analyzer] exploded-graph-rewriter: Fix escaping StringRegions. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to comm

[PATCH] D63580: [clang][NewPM] Do not eliminate available_externally durng `-O2 -flto` runs

2019-06-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: chandlerc, phosek, echristo, serge-sans-paille. leonardchan added a project: clang. Herald added subscribers: llvm-commits, dexonsmith, steven_wu, hiraditya, inglorion, mehdi_amini. Herald added a project: LLVM. This fixes `CodeGen/a

[PATCH] D62761: [analyzer] exploded-graph-rewriter: Implement a --diff mode.

2019-06-19 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363898: [analyzer] exploded-graph-rewriter: Implement a --diff mode. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D63227: [analyzer] Better timers.

2019-06-19 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked an inline comment as done. NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:228 -ExprEngine::~ExprEngine() { - BR.FlushReports(); xazax.hun wrote: > Hmm. Maybe add an assert that all the bug reports are flushed at

RE: r363855 - [clang] Adapt ASTMatcher to explicit(bool) specifier

2019-06-19 Thread via cfe-commits
Hi Gauthier, Your commit seemed to have broken the build on Windows. Can you take a look? http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/110 494.204 [1215/36/2881] Linking CXX executable bin\clang-query.exe FAILED: bin/clang-query.exe cmd.exe /C "cd .

[PATCH] D63174: [clang][NewPM] Add RUNS for tests that produce slightly different IR under new PM

2019-06-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 205707. Herald added subscribers: dexonsmith, steven_wu, javed.absar, mehdi_amini. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63174/new/ https://reviews.llvm.org/D63174 Files: clang/test/CodeGen/aggrega

[PATCH] D63156: [clang][NewPM] Add -fno-experimental-new-pass-manager to tests

2019-06-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 205708. leonardchan marked 3 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63156/new/ https://reviews.llvm.org/D63156 Files: clang/test/CodeGen/aggregate-assign-call.c clang/test

[PATCH] D63156: [clang][NewPM] Add -fno-experimental-new-pass-manager to tests

2019-06-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. >> **CodeGen/pgo-sample.c [No new fix]**: The test checks that `PruneEH` runs, >> but there doesn’t seem to be a corresponding new PM pass for it. Should >> there be? If there is one then we can just check for that in the debug PM >> dump. > > The analog would be `

[PATCH] D63361: Pretend NRVO variables are references so they can be found by debug info

2019-06-19 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 205712. akhuang marked 2 inline comments as done. akhuang added a comment. Herald added a subscriber: javed.absar. - fix alignment of pointer in inalloca case - make existing tests stop failing by changing some and adding a check for existing return value all

[PATCH] D63277: [CUDA][HIP] Don't set "comdat" attribute for CUDA device stub functions.

2019-06-19 Thread Konstantin Pyzhov via Phabricator via cfe-commits
kpyzhov added a comment. In D63277#1550870 , @rjmccall wrote: > This optimization is disabled for functions not in COMDAT sections? Is that > documented somewhere? It is documented here: https://docs.microsoft.com/en-us/cpp/build/reference/opt-optimiz

<    1   2   3   >