[PATCH] D80317: [SYCL] Prohibit arithmetic operations for incompatible pointers

2020-05-21 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:10090 // if both are pointers check if operation is valid wrt address spaces - if (S.getLangOpts().OpenCL && isLHSPointer && isRHSPointer) { + if ((S.getLangOpts().OpenCL || S.getLangOpts().SYCLIsDevice)

[PATCH] D80360: [PCH] Support writing BuiltinBitCastExprs to PCHs

2020-05-21 Thread hyd-dev via Phabricator via cfe-commits
hyd-dev updated this revision to Diff 265436. hyd-dev added a comment. Format the test `builtin-bit-cast.cpp`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80360/new/ https://reviews.llvm.org/D80360 Files: clang/include/clang/AST/ExprCXX.h clang/include/clang/Serialization/ASTBitC

[PATCH] D57890: [analyzer] Fix in self assignment checker

2020-05-21 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. Herald added subscribers: ASDenysPetrov, martong, steakhal. I think you can create a unit test for this: create a pre-call checker that checks for the assignment operator and asserts that we are not in top level. Create a test code with a simple class without

[clang] c2c36c4 - [clang][index] Fix a crash for accessing a null field decl.

2020-05-21 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2020-05-21T09:47:36+02:00 New Revision: c2c36c4f4b69ade6d8610b1dc98ff9f02c94320d URL: https://github.com/llvm/llvm-project/commit/c2c36c4f4b69ade6d8610b1dc98ff9f02c94320d DIFF: https://github.com/llvm/llvm-project/commit/c2c36c4f4b69ade6d8610b1dc98ff9f02c94320d.diff LO

[PATCH] D80344: [Windows SEH]: HARDWARE EXCEPTION HANDLING (MSVC option -EHa)

2020-05-21 Thread Ten Tzen via Phabricator via cfe-commits
tentzen updated this revision to Diff 265442. tentzen added a comment. fixed formats Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80344/new/ https://reviews.llvm.org/D80344 Files: clang/include/clang/AST/Stmt.h clang/include/clang/Basic/LangO

[PATCH] D69987: [RISCV] Assemble/Disassemble v-ext instructions.

2020-05-21 Thread Ferran Pallarès Roca via Phabricator via cfe-commits
fpallares added inline comments. Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:2283 + unsigned Src2Reg = Inst.getOperand(1).getReg(); + if (DestReg == Src2Reg) +return Error(Loc, "The destination vector register group cannot overlap" --

[PATCH] D80366: [Analyzer] Add `getReturnValueUnderConstruction()` to `CallEvent`

2020-05-21 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added reviewers: NoQ, Szelethus. baloghadamsoftware added a project: clang. Herald added subscribers: ASDenysPetrov, martong, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, xazax.hun, wh

[PATCH] D79921: [OPENMP] Fix mixture of omp and clang pragmas

2020-05-21 Thread ISHIGURO, Hiroshi via Phabricator via cfe-commits
hishiguro updated this revision to Diff 265450. hishiguro added a comment. Thank you for your comment. I updated source. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79921/new/ https://reviews.llvm.org/D79921 Files: clang/lib/CodeGen/CGStmtOpenMP.cpp clang/test/OpenMP/omp_with_loo

[PATCH] D77846: [analyzer][CallAndMessage][NFC] Split up checkPreCall

2020-05-21 Thread Balázs Kéri via Phabricator via cfe-commits
balazske accepted this revision. balazske added a comment. This revision is now accepted and ready to land. Looks good. Not sure if it work in all cases after the `MallocChecker` problems but we can fix problems if any later. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77846/new/ htt

[PATCH] D80369: [DebugInfo] Remove decl subprograms from 'retainedTypes:'

2020-05-21 Thread Djordje Todorovic via Phabricator via cfe-commits
djtodoro created this revision. djtodoro added reviewers: dblaikie, aprantl, vsk. djtodoro added projects: LLVM, debug-info. Herald added a project: clang. Herald added a subscriber: cfe-commits. After the D70350 , the `retainedTypes:` isn't being used for the pur

[PATCH] D80018: [Analyzer][StreamChecker] Added check for "indeterminate file position".

2020-05-21 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a subscriber: NoQ. Szelethus added a comment. I have more questions than actual objections, but here we go! The patch looks nice overall, we just need to iron a few things out ahead of time. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:107 +

[PATCH] D80018: [Analyzer][StreamChecker] Added check for "indeterminate file position".

2020-05-21 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:107 + /// This value applies to all error states in ErrorState except FEOF. + /// An EOF+indeterminate state is the same as EOF state. + bool FilePositionIndeterminate = false; ---

[PATCH] D80371: [clang-tidy] Fix potential assert in use-noexcept check

2020-05-21 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, alexfh, gribozavr2. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. Fix a potential assert in use-noexcept check if there is an issue getting the `TypeSourceInfo` as well as a small clean up.

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-05-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a subscriber: vsavchenko. NoQ added a comment. This revision is now accepted and ready to land. Looks fantastic, thanks! I guess let's race with @vsavchenko on whoever commits first :p CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77802/new/ https:

[PATCH] D80300: [Driver] Add DEFAULT_DYLD_PREFIX and DEFAULT_RPATH to complement DEFAULT_SYSROOT

2020-05-21 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai accepted this revision. nemanjai added subscribers: tstellar, brad, craig.topper, joerg. nemanjai added a comment. This revision is now accepted and ready to land. Thank you for sorting this out. I think it is quite useful to be able to configure the compiler to use complete non-standard

[PATCH] D80018: [Analyzer][StreamChecker] Added check for "indeterminate file position".

2020-05-21 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/test/Analysis/stream-error.c:182 +} else { + fwrite(Buf, 1, 10, F); // expected-warning {{might be 'indeterminate'}} +} Szelethus wrote: > Here the user checked whether F is in eof or in ferror, and

[clang] eeff1a9 - [analyzer][CallAndMessage][NFC] Split up checkPreCall

2020-05-21 Thread Kirstóf Umann via cfe-commits
Author: Kirstóf Umann Date: 2020-05-21T12:54:56+02:00 New Revision: eeff1a970a6bb09d3c046313e229e2871929cd63 URL: https://github.com/llvm/llvm-project/commit/eeff1a970a6bb09d3c046313e229e2871929cd63 DIFF: https://github.com/llvm/llvm-project/commit/eeff1a970a6bb09d3c046313e229e2871929cd63.diff

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-05-21 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. @NoQ @ASDenysPetrov I will rebase my changes - no worries :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77802/new/ https://reviews.llvm.org/D77802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[PATCH] D80366: [Analyzer] Add `getReturnValueUnderConstruction()` to `CallEvent`

2020-05-21 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. I think adding a better getter to `StackFrameContext` would make the patch a tad nicer, but other than that, I don't have much to add to this patch, unfortunately :) The code looks nice and we definitely need something like this. Comment at: clang/l

[PATCH] D46665: [Itanium] Emit type info names with external linkage.

2020-05-21 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. Herald added subscribers: mstorsjo, dexonsmith. Note: this commit was re-reverted in commit bbb2655de0049f8e6cf4482702aa616011c851c1 Author: Richard Smith Date: Mon May 21 20:10:54 2018 + Revert r332028; see PR37545 for details. llvm-svn: 33

[PATCH] D47092: downgrade strong type info names to weak_odr linkage

2020-05-21 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. I'm revisiting http://llvm.org/PR37398 as it looks like a pretty serious bug to me. I read http://llvm.org/D46665, this patch and http://llvm.org/PR37545, and my understanding is that this patch supersedes @EricWF 's original patch http://llvm.org/D46665. The only rema

[PATCH] D80018: [Analyzer][StreamChecker] Added check for "indeterminate file position".

2020-05-21 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 4 inline comments as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:107 + /// This value applies to all error states in ErrorState except FEOF. + /// An EOF+indeterminate state is the same as EOF state. + b

[PATCH] D77846: [analyzer][CallAndMessage][NFC] Split up checkPreCall

2020-05-21 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGeeff1a970a6b: [analyzer][CallAndMessage][NFC] Split up checkPreCall (authored by Szelethus). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77846/new/ https:

[PATCH] D77474: [analyzer][MallocChecker] Make NewDeleteLeaks depend on DynamicMemoryModeling rather than NewDelete

2020-05-21 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h:194 + const ProgramPointTag *Tag = nullptr) { +// Say this 3 times fast. +State = State ? State : getState(); I like the joke,

[PATCH] D80374: [Clang] Enable KF and KC mode for [_Complex] __float128

2020-05-21 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai created this revision. nemanjai added reviewers: rjmccall, rsmith, PowerPC, hfinkel. Herald added subscribers: dexonsmith, kbarton. Herald added a reviewer: aaron.ballman. Herald added a project: clang. The headers provided with recent GNU toolchains for PPC have code that includes typed

[PATCH] D78099: [analyzer][RetainCount] Tie diagnostics to osx.cocoa.RetainCount rather then RetainCountBase, for the most part

2020-05-21 Thread Gabor Marton via Phabricator via cfe-commits
martong requested changes to this revision. martong added a comment. This revision now requires changes to proceed. Found a small mistake that should be corrected, then will be good to me. Comment at: clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp:

[PATCH] D78126: [analyzer][NFC] Don't allow dependency checkers to emit diagnostics

2020-05-21 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. LGTM! Comment at: clang/lib/StaticAnalyzer/Core/BugReporter.cpp:2132 + + assert(!isDependency(Registry, bt.getCheckerName()) && + "Some checkers depend on this one

[PATCH] D79710: [clang][BFloat] add create/set/get/dup intrinsics

2020-05-21 Thread Ties Stuij via Phabricator via cfe-commits
stuij added a comment. In D79710#2041418 , @LukeGeeson wrote: > Can you update the commit message in this differential as well please? Same > for the other commits :) done Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D71726: Let clang atomic builtins fetch add/sub support floating point types

2020-05-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 265479. yaxunl marked an inline comment as done. yaxunl edited the summary of this revision. yaxunl added a comment. Herald added subscribers: kerbowa, nhaehnle, jvesely. Added TargetInfo::isFPAtomicFetchAddSubSupported to guard fp atomic. CHANGES SINCE LAST

[PATCH] D80369: WIP: [DebugInfo] Remove decl subprograms from 'retainedTypes:'

2020-05-21 Thread Djordje Todorovic via Phabricator via cfe-commits
djtodoro updated this revision to Diff 265481. djtodoro retitled this revision from "[DebugInfo] Remove decl subprograms from 'retainedTypes:'" to "WIP: [DebugInfo] Remove decl subprograms from 'retainedTypes:'". djtodoro added a comment. Still have test failing: Clang :: Modules/DebugInfoTra

[PATCH] D79921: [OPENMP] Fix mixture of omp and clang pragmas

2020-05-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 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79921/new/ https://reviews.llvm.org/D79921 ___ cfe-commits mailing list cfe-commits@l

[clang] 361e4f1 - Fix debug info for NoDebug attr

2020-05-21 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2020-05-21T09:02:56-04:00 New Revision: 361e4f14e35981e7498a38ab7c31da7fb7414fb8 URL: https://github.com/llvm/llvm-project/commit/361e4f14e35981e7498a38ab7c31da7fb7414fb8 DIFF: https://github.com/llvm/llvm-project/commit/361e4f14e35981e7498a38ab7c31da7fb7414fb8.dif

[PATCH] D80317: [SYCL] Prohibit arithmetic operations for incompatible pointers

2020-05-21 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 265487. bader added a comment. Enable diagnostics for non-OpenCL modes and applied refactoring proposed by John. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80317/new/ https://reviews.llvm.org/D80317 Files:

[PATCH] D79967: Fix debug info for NoDebug attr

2020-05-21 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG361e4f14e359: Fix debug info for NoDebug attr (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79967/new/

[PATCH] D80295: [Sema] Diagnose static data members in classes nested in unnamed classes

2020-05-21 Thread John Brawn via Phabricator via cfe-commits
john.brawn updated this revision to Diff 265486. john.brawn marked an inline comment as done. john.brawn added a comment. Use the tag of the anonymous struct when emitting a diagnostic. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80295/new/ https://reviews.llvm.org/D80295 Files: cl

[clang] 1c8f999 - [analyzer][CallAndMessage] Add checker options for each bug type

2020-05-21 Thread Kirstóf Umann via cfe-commits
Author: Kirstóf Umann Date: 2020-05-21T15:31:37+02:00 New Revision: 1c8f999e0b59731a4214f76528f83e4196e1fcc3 URL: https://github.com/llvm/llvm-project/commit/1c8f999e0b59731a4214f76528f83e4196e1fcc3 DIFF: https://github.com/llvm/llvm-project/commit/1c8f999e0b59731a4214f76528f83e4196e1fcc3.diff

[PATCH] D80294: Add support for vmsumudm

2020-05-21 Thread Ahsan Saghir via Phabricator via cfe-commits
saghir added a comment. In D80294#2048049 , @amyk wrote: > I think this overall looks good, but just curious, why was the builtin > support removed? I was hitting some errors with that, so removed it and would add that later on. CHANGES SINCE LAST ACT

[PATCH] D80300: [Driver] Add DEFAULT_DYLD_PREFIX and DEFAULT_RPATH to complement DEFAULT_SYSROOT

2020-05-21 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:452 CmdArgs.push_back("-dynamic-linker"); - CmdArgs.push_back(Args.MakeArgString(Loader)); + CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) + +

[PATCH] D77866: [analyzer][CallAndMessage] Add checker options for each bug category

2020-05-21 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus marked 4 inline comments as done. Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp:66 + // convert these to actual checkers. + enum CheckKind { +CK_FunctionPointer, martong wrote: > So, we ar

[PATCH] D80079: [clang-format] [NFC] isCpp() is inconsistently used to mean both C++ and Objective C, add language specific isXXX() functions

2020-05-21 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. I like these changes. I have mixed feelings about `isCpp()` & co. As @MyDeveloperDay said, I'd like it mean C++ only. I find it confusing that it means C++ or ObjC (even if the latter is a superset of the former). I'd rather see it spelt as `isCppOrObjC()` even if it's

[PATCH] D77866: [analyzer][CallAndMessage] Add checker options for each bug category

2020-05-21 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Szelethus marked an inline comment as done. Closed by commit rG1c8f999e0b59: [analyzer][CallAndMessage] Add checker options for each bug type (authored by Szelethus). Changed prior to commit: https://reviews.llvm.org/D778

[PATCH] D80295: [Sema] Diagnose static data members in classes nested in unnamed classes

2020-05-21 Thread John Brawn via Phabricator via cfe-commits
john.brawn added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:6904 << Name << RD->getTagKind(); Invalid = true; +} else if (RD->isLocalClass()) { rjmccall wrote: > This diagnostic actually ignores the tag kind that pass

[PATCH] D79945: [Sema] Comparison of pointers to complete and incomplete types

2020-05-21 Thread Benson Chu via Phabricator via cfe-commits
pestctrl added a comment. Ah, you're right. I don't see the clause in the C11 standard. I'll see what I can do. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79945/new/ https://reviews.llvm.org/D79945 ___

[clang] 3ef1134 - Fix DeferredDiagnosticsEmitter for bug#45987

2020-05-21 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2020-05-21T11:01:40-04:00 New Revision: 3ef11346f391e6e3da0cfa25f9f7dac22771438e URL: https://github.com/llvm/llvm-project/commit/3ef11346f391e6e3da0cfa25f9f7dac22771438e DIFF: https://github.com/llvm/llvm-project/commit/3ef11346f391e6e3da0cfa25f9f7dac22771438e.dif

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPKinds.def:483 +__OMP_RTL(__kmpc_push_num_teams, false, /* Void? */ Int32, IdentPtr, Int32, + Int32, Int32) For this one there's c

[PATCH] D80317: [SYCL] Prohibit arithmetic operations for incompatible pointers

2020-05-21 Thread Alexey Bader via Phabricator via cfe-commits
bader marked 2 inline comments as done. bader added a comment. Thanks for the review. I've enabled the diagnostics for all the modes. I also applied the refactoring suggested by @rjmccall. Hopefully I understand it correctly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D80300: [Driver] Add DEFAULT_DYLD_PREFIX and DEFAULT_RPATH to complement DEFAULT_SYSROOT

2020-05-21 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. I do agree with the feature request, but I'm not sure about the implementation. It doesn't seem to work well with the cross-compiling support in the driver as clearly shown by the amount of tests that need patching. Is cross-compiling a concern for you at all? Otherwise I

[PATCH] D79830: Add support of __builtin_expect_with_probability

2020-05-21 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2197 +const Expr *ProbArg = E->getArg(2); +ProbArg->EvaluateAsFloat(Probability, CGM.getContext()); +llvm::Type *Ty = ConvertType(ProbArg->getType()); You likely need to ass

[PATCH] D79477: [clang-tidy] Add --use-color command line option and UseColor option to control colors in diagnostics

2020-05-21 Thread hyd-dev via Phabricator via cfe-commits
hyd-dev added a comment. Fix typos in the summary. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79477/new/ https://reviews.llvm.org/D79477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D80171: [analyzer] LoopUnrolling: fix crash when a parameter is a loop counter

2020-05-21 Thread Abbas Sabra via Phabricator via cfe-commits
AbbasSabra added a comment. Great! Can someone take care of merging it? I believe I don't have access. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80171/new/ https://reviews.llvm.org/D80171 ___ cfe-c

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-05-21 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @NoQ many thanks. I'll land it. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77802/new/ https://reviews.llvm.org/D77802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-21 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. > libomp used to pass until I changed it to us getOrCreateRuntimeFunction I > think. Those tests are flaky, I think. Just run them a few times. I don't expect this to influence them at all. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder

[PATCH] D79708: [clang][BFloat] add NEON emitter for bfloat

2020-05-21 Thread Ties Stuij via Phabricator via cfe-commits
stuij marked 6 inline comments as done. stuij added inline comments. Comment at: clang/include/clang/Basic/arm_bf16.td:1 +//===--- arm_fp16.td - ARM FP16 compiler interface ===// +// SjoerdMeijer wrote: > typo: fp16 - > bf16? > Here, and

[PATCH] D80362: [WebAssembly] Warn on exception spec only when Wasm EH is used

2020-05-21 Thread Derek Schuff via Phabricator via cfe-commits
dschuff accepted this revision. dschuff added a comment. This revision is now accepted and ready to land. otherwise LGTM Comment at: clang/docs/DiagnosticsReference.rst:14018 ++-

[PATCH] D79993: Place control block after AST block in PCM files (Patch series 1/3)

2020-05-21 Thread Daniel Grumberg via Phabricator via cfe-commits
dang abandoned this revision. dang added a comment. Herald added a subscriber: sstefan1. After some further discussion offline with @Bigcheese the cleaner course of action is to make the AST block relocatable see revision D80383 Repository: rG LLVM Github Mo

[PATCH] D80079: [clang-format] [NFC] isCpp() is inconsistently used to mean both C++ and Objective C, add language specific isXXX() functions

2020-05-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. > As @MyDeveloperDay said, I'd like it mean C++ only. I find it confusing that > it means C++ or ObjC (even if the latter is a superset of the former). I'd > rather see it spelt as `isCppOrObjC()` even if it's verbose but at least > removes all confusion IMO.

[PATCH] D79998: Add AST_SIGNATURE record to unhashed control block of pcm files (Patch series 2/3)

2020-05-21 Thread Daniel Grumberg via Phabricator via cfe-commits
dang abandoned this revision. dang added a comment. This revision is superseded by D80383 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79998/new/ https://reviews.llvm.org/D79998

[PATCH] D80383: Add AST_SIGNATURE record to unhashed control block of PCM files

2020-05-21 Thread Daniel Grumberg via Phabricator via cfe-commits
dang created this revision. dang added a reviewer: Bigcheese. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. This record is constructed by hashing the bytes of the AST block in a similiar fashion to the SIGNATURE record. This new signature only means anything if

[PATCH] D79708: [clang][BFloat] add NEON emitter for bfloat

2020-05-21 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added inline comments. Comment at: clang/utils/TableGen/NeonEmitter.cpp:2198 +static void emitNeonTypeDefs(const std::string& types, raw_ostream &OS) { + std::string TypedefTypes(types); stuij wrote: > fpetrogalli wrote: > > Is this related to the

[PATCH] D80323: [SVE] Eliminate calls to default-false VectorType::get() from Clang

2020-05-21 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli accepted this revision. fpetrogalli added a comment. This revision is now accepted and ready to land. LGTM, it would be great if you could address the two comments I added, before submitting. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:10775 - llvm::VectorType *

[PATCH] D79708: [clang][BFloat] add NEON emitter for bfloat

2020-05-21 Thread Ties Stuij via Phabricator via cfe-commits
stuij updated this revision to Diff 265524. stuij added a comment. addressed review comments, most of all changed license header on the generated bfloat file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79708/new/ https://reviews.llvm.org/D79708

[PATCH] D80323: [SVE] Eliminate calls to default-false VectorType::get() from Clang

2020-05-21 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli added a comment. In D80323#2048457 , @rjmccall wrote: > I'm sympathetic to wanting to get rid of the boolean flag, but this is a > really invasive change for pretty minimal benefit. Why not leave > `VectorType::get` as meaning a non-scalable

[PATCH] D80295: [Sema] Diagnose static data members in classes nested in unnamed classes

2020-05-21 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:6904 << Name << RD->getTagKind(); Invalid = true; +} else if (RD->isLocalClass()) { john.brawn wrote: > rjmccall wrote: > > This diagnostic actually ignores th

[PATCH] D79708: [clang][BFloat] add NEON emitter for bfloat

2020-05-21 Thread Ties Stuij via Phabricator via cfe-commits
stuij marked 2 inline comments as done. stuij added inline comments. Comment at: clang/utils/TableGen/NeonEmitter.cpp:2416 +" *\n" +" * Permission is hereby granted, free of charge, to any person " +"obtaining a copy\n" stuij wrote: > Sjoe

[PATCH] D79830: Add support of __builtin_expect_with_probability

2020-05-21 Thread Zhi Zhuang via Phabricator via cfe-commits
LukeZhuang added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2204 +if (CGM.getCodeGenOpts().OptimizationLevel == 0) + return RValue::get(ArgValue); + erichkeane wrote: > Do you still need to evaluate this for side-effects even when calle

[PATCH] D80383: Add AST_SIGNATURE record to unhashed control block of PCM files

2020-05-21 Thread Daniel Grumberg via Phabricator via cfe-commits
dang updated this revision to Diff 265530. dang added a comment. Herald added a reviewer: jdoerfert. Herald added subscribers: sstefan1, ormris. Formatting fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80383/new/ https://reviews.llvm.org/D803

[PATCH] D80323: [SVE] Eliminate calls to default-false VectorType::get() from Clang

2020-05-21 Thread Christopher Tetreault via Phabricator via cfe-commits
ctetreau added a comment. In D80323#2048457 , @rjmccall wrote: > I'm sympathetic to wanting to get rid of the boolean flag, but this is a > really invasive change for pretty minimal benefit. Why not leave > `VectorType::get` as meaning a non-scalable ve

[PATCH] D80317: [SYCL] Prohibit arithmetic operations for incompatible pointers

2020-05-21 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Please add a C test case just using the address_space attribute. Comment at: clang/include/clang/AST/Type.h:1069 + /// qualifiers. + bool isAddressSpaceOverlapping(const QualType &T) const { +Qualifiers Q = getQualifiers(); It's

[PATCH] D80079: [clang-format] [NFC] isCpp() is inconsistently used to mean both C++ and Objective C, add language specific isXXX() functions

2020-05-21 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang/include/clang/Format/Format.h:1632 + bool isCppOnly() const { return Language == LK_Cpp; } + bool isObjectiveC() const { return Language == LK_ObjC; } + bool isCpp() const { return isCppOnly() || isObjectiveC(); } --

[PATCH] D80383: Add AST_SIGNATURE record to unhashed control block of PCM files

2020-05-21 Thread Daniel Grumberg via Phabricator via cfe-commits
dang updated this revision to Diff 265535. dang added a comment. Accidently deleted a line in the previous update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80383/new/ https://reviews.llvm.org/D80383 Files: clang/include/clang/Serialization/A

[PATCH] D80251: [X86] Update some av512 shift intrinsics to use "unsigned int" parameter instead of int to match Intel documentaiton

2020-05-21 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. Can we add -Wsign-conversion checks to the tests? That was mentioned on PR45931 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80251/new/ https://reviews.llvm.org/D80251 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D80126: Add documentation URL records to the .dia format and expose them via libclang

2020-05-21 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. Hi Owen, Do you plan to land the functionality for emitting documentation URLs in clang too? Comment at: clang/lib/Frontend/SerializedDiagnosticReader.cpp:323 + // A documentation URL has an ID and path size. + if (Record.size() != 2) +

[PATCH] D80300: [Driver] Add DEFAULT_DYLD_PREFIX and DEFAULT_RPATH to complement DEFAULT_SYSROOT

2020-05-21 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. In D80300#2049181 , @joerg wrote: > It doesn't seem to work well with the cross-compiling support in the driver > as clearly shown by the amount of tests that need patching. I don't see the test changes as reflect

[PATCH] D79830: Add support of __builtin_expect_with_probability

2020-05-21 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:2202 +// won't use it for anything. +// Note, we still IRGen ExpectedValue because it could have side-effects. +if (CGM.getCodeGenOpts().OptimizationLevel == 0) erichkeane w

[PATCH] D80079: [clang-format] [NFC] isCpp() is inconsistently used to mean both C++ and Objective C, add language specific isXXX() functions

2020-05-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 2 inline comments as done. MyDeveloperDay added a comment. I feel like there might something of a concencus forming.. If I take the time to redo following the suggestions @sammccall do you think you could live with it? Comment at: clang/include/clang/For

[PATCH] D80225: [Driver] Recognize -fuse-ld={bfd, gold, lld} but don't prepend "ld." or "ld64." for other values

2020-05-21 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. It's worrying to me that there number of places in LLVM that at the exact argument value of "-fuse-ld=". E.g. in the windows and PS4 toolchains. We already claim to support arbitrary values and full paths, but if you specify "-fuse-ld=/path/to/lld-link" on Windows toda

[PATCH] D71726: Let clang atomic builtins fetch add/sub support floating point types

2020-05-21 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/include/clang/Basic/TargetInfo.h:1418 + /// Whether floating point atomic fetch add/sub is supported. + virtual bool isFPAtomicFetchAddSubSupported() const { return false; } + I think it should be predicated on speci

[PATCH] D80323: [SVE] Eliminate calls to default-false VectorType::get() from Clang

2020-05-21 Thread Christopher Tetreault via Phabricator via cfe-commits
ctetreau updated this revision to Diff 265542. ctetreau added a comment. address code review issues Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80323/new/ https://reviews.llvm.org/D80323 Files: clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeG

[PATCH] D80323: [SVE] Eliminate calls to default-false VectorType::get() from Clang

2020-05-21 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D80323#2049374 , @ctetreau wrote: > In D80323#2048457 , @rjmccall wrote: > > > I'm sympathetic to wanting to get rid of the boolean flag, but this is a > > really invasive change for pr

[PATCH] D80317: [SYCL] Prohibit arithmetic operations for incompatible pointers

2020-05-21 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 265547. bader added a comment. - Added C test case with address_space attribute. - Move isAddressSpaceOverlapping from PointerType to QualType. - Move C++ test case to clang/test/SemaCXX Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D80317: [SYCL] Prohibit arithmetic operations for incompatible pointers

2020-05-21 Thread Alexey Bader via Phabricator via cfe-commits
bader marked 2 inline comments as done. bader added inline comments. Comment at: clang/include/clang/AST/Type.h:1069 + /// qualifiers. + bool isAddressSpaceOverlapping(const QualType &T) const { +Qualifiers Q = getQualifiers(); rjmccall wrote: > It's idioma

[PATCH] D80391: [Driver] Don't make -gsplit-dwarf imply -g2

2020-05-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: aprantl, dblaikie, echristo, JDevlieghere, jhenderson, probinson, thakis. Herald added a project: clang. Herald added a subscriber: cfe-commits. RFC: http://lists.llvm.org/pipermail/cfe-dev/2020-May/065430.html Agreement from GCC: https://s

[PATCH] D79830: Add support of __builtin_expect_with_probability

2020-05-21 Thread Zhi Zhuang via Phabricator via cfe-commits
LukeZhuang marked 6 inline comments as done. LukeZhuang added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:1805 +const Expr *ProbArg = TheCall->getArg(2); +if (ProbArg->isValueDependent()) + return ExprError(); erichkeane wrote: > Luk

[PATCH] D80323: [SVE] Eliminate calls to default-false VectorType::get() from Clang

2020-05-21 Thread John McCall via Phabricator via cfe-commits
rjmccall requested changes to this revision. rjmccall added a comment. This revision now requires changes to proceed. I've responded to the llvmdev thread, which I missed before. I would like us to hold off on this line or work until we come to a resolution there. Repository: rG LLVM Github

[PATCH] D80391: [Driver] Don't make -gsplit-dwarf imply -g2

2020-05-21 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. I think it's probably best to keep this subject on the cfe-dev thread until there's agreement there. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80391/new/ https://reviews.llvm.org/D80391

[PATCH] D79830: Add support of __builtin_expect_with_probability

2020-05-21 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. FYI: I'm more of a clang contributor, so I'm unable to review the LLVM code, hopefully someone will come along who can check on that. Comment at: clang/lib/Sema/SemaChecking.cpp:1805 +const Expr *ProbArg = TheCall->getArg(2); +if (ProbArg->i

[PATCH] D79972: [OpenMP5.0] map item can be non-contiguous for target update

2020-05-21 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen updated this revision to Diff 265562. cchen added a comment. Herald added a subscriber: sstefan1. Remove redundant code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79972/new/ https://reviews.llvm.org/D79972 Files: clang/include/clang/AST

[PATCH] D79972: [OpenMP5.0] map item can be non-contiguous for target update

2020-05-21 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79972/new/ https://reviews.llvm.org/D79972 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D71726: Let clang atomic builtins fetch add/sub support floating point types

2020-05-21 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added inline comments. Comment at: clang/test/CodeGen/atomic-ops.c:296 + // CHECK: fsub + return __atomic_sub_fetch(p, 1.0, memory_order_relaxed); +} yaxunl wrote: > ldionne wrote: > > Sorry if that's a dumb question, but I'm a bit confused: `p` is a

[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

2020-05-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked 2 inline comments as done. jhuber6 added inline comments. Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:203 + static Function *getOrCreateRuntimeFunction(Module &Md, + omp::RuntimeFunction FnID); --

[PATCH] D80317: [SYCL] Prohibit arithmetic operations for incompatible pointers

2020-05-21 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/include/clang/AST/Type.h:1069 + /// qualifiers. + bool isAddressSpaceOverlapping(const QualType &T) const { +Qualifiers Q = getQualifiers();

[PATCH] D77177: [Analyzer][WebKit] RefCntblBaseVirtualDtorChecker & shared utils

2020-05-21 Thread Jan Korous via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf7c7e8a523f5: [Analyzer][WebKit] RefCntblBaseVirtualDtorChecker (authored by jkorous). Herald added a project: clang. Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llv

[clang] f7c7e8a - [Analyzer][WebKit] RefCntblBaseVirtualDtorChecker

2020-05-21 Thread Jan Korous via cfe-commits
Author: Jan Korous Date: 2020-05-21T11:54:49-07:00 New Revision: f7c7e8a523f56b0ed1b14c0756ba4e5d1ccb48d2 URL: https://github.com/llvm/llvm-project/commit/f7c7e8a523f56b0ed1b14c0756ba4e5d1ccb48d2 DIFF: https://github.com/llvm/llvm-project/commit/f7c7e8a523f56b0ed1b14c0756ba4e5d1ccb48d2.diff LO

[PATCH] D66564: [clang-tidy] new altera struct pack align check

2020-05-21 Thread Frank Derry Wanye via Phabricator via cfe-commits
ffrankies added a comment. @Eugene.Zelenko Just checking in, is there anything I missed regarding what we need to do for these checks? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66564/new/ https://reviews.llvm.org/D66564

[PATCH] D76077: [ARM] Add __bf16 as new Bfloat16 C Type

2020-05-21 Thread Luke Geeson via Phabricator via cfe-commits
LukeGeeson added inline comments. Comment at: clang/test/CodeGen/arm-mangle-16bit-float.cpp:4 + +// CHECK64: define {{.*}}void @_Z3foou6__bf16(half %b) +// CHECK32: define {{.*}}void @_Z3foou6__bf16(i32 %b.coerce) SjoerdMeijer wrote: > LukeGeeson wrote: > > craig

[PATCH] D80300: [Driver] Add DEFAULT_DYLD_PREFIX and DEFAULT_RPATH to complement DEFAULT_SYSROOT

2020-05-21 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. I see that more as a short-coming in the existing DEFAULT_SYSROOT behavior and less an argument for making more cases like it. So the general idea is that for turnkey toolchains, we want to allow customizing the "default" target of the toolchain to hard-code options like

[PATCH] D56456: [Driver] Default to -fno-addrsig on Android.

2020-05-21 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Do we still need this? I was surprised by clang not using faddrsing on Andriod by default. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56456/new/ https://reviews.llvm.org/D56456 ___ cfe-comm

[clang] 1108f5c - Revert "[Analyzer][WebKit] RefCntblBaseVirtualDtorChecker"

2020-05-21 Thread Nico Weber via cfe-commits
Author: Nico Weber Date: 2020-05-21T15:49:46-04:00 New Revision: 1108f5c737dbdab0277874a7e5b237491839c43a URL: https://github.com/llvm/llvm-project/commit/1108f5c737dbdab0277874a7e5b237491839c43a DIFF: https://github.com/llvm/llvm-project/commit/1108f5c737dbdab0277874a7e5b237491839c43a.diff LO

[PATCH] D56456: [Driver] Default to -fno-addrsig on Android.

2020-05-21 Thread Dan Albert via Phabricator via cfe-commits
danalbert added a comment. The NDK still supports linkers other than LLD, but we are changing the default to LLD in the next release. I'd prefer to keep this for the time being, but don't feel strongly about it. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56456

[PATCH] D80317: [SYCL] Prohibit arithmetic operations for incompatible pointers

2020-05-21 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 265579. bader marked an inline comment as done. bader added a comment. Fix formatting in clang/test/Sema/address_spaces.c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80317/new/ https://reviews.llvm.org/D80317

  1   2   >