[PATCH] D86000: Add an unsigned shift base sanitizer

2020-08-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. What's next, a sanitizer that input to signed right-shift is always non-negative? :) FWIW "fixing" these "bugs" via `(x & ~(~1U << (32-shamt))) << shamt` is going to be fine, i've already taught instcombine to drop such pointless masking before left-shift in PR42563

[PATCH] D84988: WIP [Coverage] Add empty line regions to SkippedRegions

2020-08-14 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 285811. zequanwu added a comment. Herald added a project: Sanitizers. Herald added a subscriber: Sanitizers. - Rebase. - Merging adjcent skipped regions, if the regions are in the same file, could reduce binary size. - The new empty lines regions break exist

[PATCH] D85948: [HeapProf] Clang and LLVM support for heap profiling instrumentation

2020-08-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. I am still trying to read the logic. Some comments to the tests. Some comments are applicable to other tests. Comment at: llvm/test/Instrumentation/HeapProfiling/basic.ll:22 +; CHECK: %[[LOAD_ADDR:[^ ]*]] = ptrtoint i32* %a to i64 +; CHECK: %[[MASK

[PATCH] D85948: [HeapProf] Clang and LLVM support for heap profiling instrumentation

2020-08-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/test/Instrumentation/HeapProfiling/basic.ll:1 +; Test basic address sanitizer instrumentation. +; The implementation file is HeapProfiler.cpp Naming the test directory `Heapprofiler` can reduce the number of terms

[PATCH] D85948: [HeapProf] Clang and LLVM support for heap profiling instrumentation

2020-08-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Basic/CodeGenOptions.def:148 CODEGENOPT(MergeFunctions, 1, 0) ///< Set when -fmerge-functions is enabled. +CODEGENOPT(HeapProf , 1, 0) ///< Set when -fmemprof is enabled. CODEGENOPT(MSVolatile

[PATCH] D85998: Add clang-cl "vctoolsdir" option to specify the location of the msvc toolchain

2020-08-14 Thread Zachary Henkel via Phabricator via cfe-commits
zahen updated this revision to Diff 285803. zahen added a comment. Fix formatting CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85998/new/ https://reviews.llvm.org/D85998 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/MSVC.cpp clang/test/Driver/cl-option

[PATCH] D86008: [test] Fix aggregate-assign-call.c in preparation for -enable-npm-optnone

2020-08-14 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen accepted this revision. ychen added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86008/new/ https://reviews.llvm.org/D86008 ___ cf

[PATCH] D86011: [test] Fix thinlto-debug-pm.c in preparation for -enable-npm-optnone

2020-08-14 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. aeubanks added reviewers: asbirlea, ychen. Herald added subscribers: cfe-commits, dexonsmith, steven_wu, hiraditya, inglorion. Herald added a project: clang. aeubanks requested review of this revision. This fails due to the clang invocation running at -O0, producin

[PATCH] D85948: [HeapProf] Clang and LLVM support for heap profiling instrumentation

2020-08-14 Thread David Li via Phabricator via cfe-commits
davidxl accepted this revision. davidxl added a comment. This revision is now accepted and ready to land. lgtm. The user option should be documented after the runtime is ready. Comment at: llvm/lib/Transforms/Instrumentation/HeapProfiler.cpp:71 + +// This flag may need to be re

[PATCH] D86008: [NewPM][optnone] Fix clang tests in preparation for -enable-npm-optnone

2020-08-14 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 285797. aeubanks added a comment. Split out other test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86008/new/ https://reviews.llvm.org/D86008 Files: clang/test/CodeGen/aggregate-assign-call.c Index: cla

[PATCH] D86008: [NewPM][optnone] Fix clang tests in preparation for -enable-npm-optnone

2020-08-14 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. Herald added subscribers: cfe-commits, dexonsmith, steven_wu, hiraditya. Herald added a project: clang. aeubanks requested review of this revision. These are the last clang tests failing before being able to turn on -enable-npm-optnone. Repository: rG LLVM Gith

[PATCH] D84371: [DFSan] Add efficient fast16labels instrumentation mode.

2020-08-14 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: compiler-rt/lib/dfsan/dfsan.cpp:180 dfsan_label __dfsan_union(dfsan_label l1, dfsan_label l2) { - if (flags().fast16labels) + if (fast16labels) return l1 | l2; morehouse wrote: > morehouse wrote: > > vitalybuka

[PATCH] D86000: Add an unsigned shift base sanitizer

2020-08-14 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a comment. In D86000#2219322 , @jfb wrote: > In D86000#2219288 , @vsk wrote: > >> It'd be nice to fold the new check into an existing sanitizer group to bring >> this to a wider audience. Do you fores

[PATCH] D86000: Add an unsigned shift base sanitizer

2020-08-14 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. In D86000#2219322 , @jfb wrote: > In D86000#2219288 , @vsk wrote: > >> It'd be nice to fold the new check into an existing sanitizer group to bring >> this to a wider audience. Do you foresee a

[PATCH] D86000: Add an unsigned shift base sanitizer

2020-08-14 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: clang/test/Driver/fsanitize.c:911 +// CHECK-unsigned-shift-base-RECOVER-NOT: "-fsanitize-trap=unsigned-shift-base" +// CHECK-unsigned-shift-base-NORECOVER-NOT: "-fno-sanitize-recover=unsigned-shift-base" +// CHECK-unsigned-shift-base-NORECO

[PATCH] D84467: Add support for Branch Coverage in LLVM Source-Based Code Coverage

2020-08-14 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.h:4359 + /// condition (i.e. no "&&" or "||"). + static bool isLeafCondition(const Expr *C); + alanphipps wrote: > vsk wrote: > > alanphipps wrote: > > > vsk wrote: > > > > vsk wrote: > >

[PATCH] D86000: Add an unsigned shift base sanitizer

2020-08-14 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D86000#2219288 , @vsk wrote: > It'd be nice to fold the new check into an existing sanitizer group to bring > this to a wider audience. Do you foresee adoption issues for existing > -fsanitize=integer adopters? Fwiw some recently-

[PATCH] D85948: [HeapProf] Clang and LLVM support for heap profiling instrumentation

2020-08-14 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson updated this revision to Diff 285777. tejohnson marked an inline comment as done. tejohnson added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85948/new/ https://reviews.llvm.org/D85948 Files: clang/include

[PATCH] D85948: [HeapProf] Clang and LLVM support for heap profiling instrumentation

2020-08-14 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson marked 12 inline comments as done. tejohnson added a comment. Addressed everyone's comments as well as the clang tidy warnings. I had hoped to get the runtime part ready and uploaded today, but it looks like I won't make it. I'll be out all next week, so will get that sent when I'm bac

[clang] e6ea877 - [NewPM][optnone] Mark various passes as required

2020-08-14 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2020-08-14T15:51:59-07:00 New Revision: e6ea8779c2e0c60007d1015cc98fe3d2642a1652 URL: https://github.com/llvm/llvm-project/commit/e6ea8779c2e0c60007d1015cc98fe3d2642a1652 DIFF: https://github.com/llvm/llvm-project/commit/e6ea8779c2e0c60007d1015cc98fe3d2642a1652.diff

[PATCH] D85457: [NewPM][optnone] Mark various passes as required

2020-08-14 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe6ea8779c2e0: [NewPM][optnone] Mark various passes as required (authored by aeubanks). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85457/new/ https://revi

[PATCH] D86000: Add an unsigned shift base sanitizer

2020-08-14 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. It'd be nice to fold the new check into an existing sanitizer group to bring this to a wider audience. Do you foresee adoption issues for existing -fsanitize=integer adopters? Fwiw some recently-added implicit conversion checks were folded in without much/any pushback. =

[PATCH] D85962: [SyntaxTree] Create annotations infrastructure and apply it in expression tests.

2020-08-14 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added a comment. This revision is now accepted and ready to land. Very nice improvement to tests! Comment at: clang/unittests/Tooling/Syntax/BuildTreeTest.cpp:784 + +TEST_P(SyntaxTreeTest, QualifiedId_ComplexDeclaration) { + if (!G

[PATCH] D85743: [CodeGen][AArch64] Support arm_sve_vector_bits attribute

2020-08-14 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM Like I mentioned on the review for the prototype, I still think we should try to implement a scheme that makes CK_BItCast between fixed and scalable types trivial. Doing coercion th

[PATCH] D86000: Add an unsigned shift base sanitizer

2020-08-14 Thread JF Bastien via Phabricator via cfe-commits
jfb created this revision. jfb added a reviewer: vsk. Herald added subscribers: Sanitizers, cfe-commits, ributzka, dexonsmith, jkorous. Herald added projects: clang, Sanitizers. jfb requested review of this revision. It's not undefined behavior for an unsigned left shift to overflow (i.e. to shif

[PATCH] D85990: [Clang] Fix BZ47169, loader_uninitialized on incomplete types

2020-08-14 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added inline comments. Comment at: clang/test/Sema/attr-loader-uninitialized.cpp:14 +extern S incomplete_external_rejected __attribute__((loader_uninitialized)); +// expected-error@-1 {{variable has incomplete type 'S'}} +// expected-note@-3 {{forward declaration

[PATCH] D85796: [Analysis] Bug fix for exploded graph branching in evalCall for constructor

2020-08-14 Thread Nithin VR via Phabricator via cfe-commits
vrnithinkumar added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/CheckerManager.cpp:682 anyEvaluated = true; +Dst.clear(); Dst.insert(checkDst); > runCheckersForEvalCall() already has its own builder, you don't need another

[PATCH] D85796: [Analysis] Bug fix for exploded graph branching in evalCall for constructor

2020-08-14 Thread Nithin VR via Phabricator via cfe-commits
vrnithinkumar updated this revision to Diff 285763. vrnithinkumar marked 3 inline comments as done. vrnithinkumar added a comment. - Fix without passing the NodeBuilder Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85796/new/ https://reviews.llvm.o

[PATCH] D85924: [clang][feature] Add cxx_abi_relative_vtable feature

2020-08-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. CC @aaron.ballman who committed Features.def for signing off or knowing someone who can sign off. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85924/new/ https://reviews.llvm.org/D85924 __

[PATCH] D85998: Add clang-cl "vctoolsdir" option to specify the location of the msvc toolchain

2020-08-14 Thread Zachary Henkel via Phabricator via cfe-commits
zahen created this revision. zahen added reviewers: rnk, hans, thakis. Herald added subscribers: cfe-commits, dang. Herald added a project: clang. zahen requested review of this revision. Add an option to directly specify where the msvc toolchain lives for clang-cl and avoid unwanted file and reg

[clang] e492f95 - [docs] Add missing semicolon to example.

2020-08-14 Thread Matt Morehouse via cfe-commits
Author: Matt Morehouse Date: 2020-08-14T13:46:05-07:00 New Revision: e492f959e0e0930af3745c1e62b7ffc31f5bf29c URL: https://github.com/llvm/llvm-project/commit/e492f959e0e0930af3745c1e62b7ffc31f5bf29c DIFF: https://github.com/llvm/llvm-project/commit/e492f959e0e0930af3745c1e62b7ffc31f5bf29c.diff

[PATCH] D85457: [NewPM][optnone] Mark various passes as required

2020-08-14 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 285752. aeubanks added a comment. -target -> -triple rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85457/new/ https://reviews.llvm.org/D85457 Files: clang/test/CodeGen/O0-no-skipped-passes.c llvm/i

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-14 Thread Gui Andrade via Phabricator via cfe-commits
guiand closed this revision. guiand added a comment. Committed as 97de0188dd5d845ff90c8ac779a2ea09688b17df Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85559/new/ https://revie

[PATCH] D84371: [DFSan] Add efficient fast16labels instrumentation mode.

2020-08-14 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: compiler-rt/lib/dfsan/dfsan.cpp:180 dfsan_label __dfsan_union(dfsan_label l1, dfsan_label l2) { - if (flags().fast16labels) + if (fast16labels) return l1 | l2; morehouse wrote: > vitalybuka wrote: > > morehouse

[PATCH] D85933: Don't track consteval references for dependent members

2020-08-14 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:1761 + llvm::SaveAndRestore DisableIITracking( + S.RebuildingImmediateInvocation, true); + Tyker wrote: > I don't think RebuildingImmediateInvocation should be used here si

[PATCH] D85144: [clang] Improve Dumping of APValues

2020-08-14 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 285747. Tyker added a comment. In D85144#2205461 , @riccibruno wrote: > I agree with you that it's fine to use `printPretty` for leaves (and > additionally it would be annoying to duplicate the `LValue` case); that's

[PATCH] D85798: Split Preprocessor/init.c test. NFC.

2020-08-14 Thread Artem Belevich via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1689c36b1aeb: Split Preprocessor/init.c test (authored by tra). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D85798: Split Preprocessor/init.c test. NFC.

2020-08-14 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 285745. tra edited the summary of this revision. tra added a comment. Separated blocks of RUN commands with an empty line to make navigation easier. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85798/new/ https://

[PATCH] D85924: [clang][feature] Add cxx_abi_relative_vtable feature

2020-08-14 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. LGTM but I'm not sure who should sign off on new `__has_feature` symbols. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85924/new/ https://r

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-14 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3573 + case LibFunc_atomic_load: +if (!isa(CB)) { + llvm::errs() << "MSAN -- cannot instrument invoke of libatomic load." guiand wrote: > euge

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-14 Thread Gui Andrade via Phabricator via cfe-commits
guiand added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3573 + case LibFunc_atomic_load: +if (!isa(CB)) { + llvm::errs() << "MSAN -- cannot instrument invoke of libatomic load." eugenis wrote: > Prob

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-08-14 Thread Mark de Wever via Phabricator via cfe-commits
Mordante planned changes to this revision. Mordante marked 14 inline comments as done. Mordante added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1288 +def Likely : StmtAttr { + let Spellings = [CXX11<"", "likely", 201803>]; + let Documentation = [LikelihoodD

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-14 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis accepted this revision. eugenis added a comment. This revision is now accepted and ready to land. LGTM with 1 comment Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3573 + case LibFunc_atomic_load: +if (!isa(CB)) { + llvm::errs

[PATCH] D85990: [Clang] Fix BZ47169, loader_uninitialized on incomplete types

2020-08-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/test/Sema/attr-loader-uninitialized.cpp:14 +extern S incomplete_external_rejected __attribute__((loader_uninitialized)); +// expected-error@-1 {{variable has incomplete type 'S'}} +// expected-note@-3 {{forward declaration of 'S

[PATCH] D74361: [Clang] Undef attribute for global variables

2020-08-14 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. Fix proposed at D85990 . Thanks for the detailed bug report! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74361/new/ https://reviews.llvm.org/D74361 __

[PATCH] D85990: [Clang] Fix BZ47169, loader_uninitialized on incomplete types

2020-08-14 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield created this revision. JonChesterfield added reviewers: erichkeane, aaron.ballman, rjmccall. Herald added a project: clang. Herald added a subscriber: cfe-commits. JonChesterfield requested review of this revision. [Clang] Fix BZ47169, loader_uninitialized on incomplete types Repo

[PATCH] D85948: [HeapProf] Clang and LLVM support for heap profiling instrumentation

2020-08-14 Thread David Li via Phabricator via cfe-commits
davidxl added a comment. I think the user visible option needs to match the functionality. Internal naming just needs some comments to document. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85948/new/ https://reviews.llvm.org/D85948

[PATCH] D85977: [release][docs] Update contributions to LLVM 11 for SVE.

2020-08-14 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 285731. fpetrogalli added a comment. Fix indentation of the code exmaple. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85977/new/ https://reviews.llvm.org/D85977 Files: clang/test/CodeGen/aarch64-sve-ac

[PATCH] D85960: [AST][FPEnv] Keep FP options in trailing storage of CastExpr

2020-08-14 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. You mentioned in D85920 a need to merge this review with that review. I don't think that's needed. This code here is farther along. It does everything that D85920 does and has necessary pieces implemented a

[PATCH] D85948: [HeapProf] Clang and LLVM support for heap profiling instrumentation

2020-08-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Driver/Options.td:995 +def fheapprof : Flag<["-"], "fheapprof">, Group, + Flags<[CoreOption, CC1Option]>, HelpText<"Enable heap profiling">; `OptInFFlag<"heapprof", "Enable", "Disable", " heap prof

[PATCH] D85948: [HeapProf] Clang and LLVM support for heap profiling instrumentation

2020-08-14 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Thanks for the comments @vitalybuka and @davidxl, will address those shortly. In D85948#2217476 , @davidxl wrote: > one nit: since the same instrumentation can be used to profiling global > variable accesses (especially those i

[PATCH] D85601: Fixes an assertion when IntRange processes a throw expression

2020-08-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85601/new/ https://reviews.llvm.org/D85601 ___ cfe-commits mailing list cfe-commits@

[PATCH] D85933: Don't track consteval references for dependent members

2020-08-14 Thread Tyker via Phabricator via cfe-commits
Tyker added a comment. thanks for this, here is a few comments aside from that this seems fine. Comment at: clang/lib/Sema/SemaOverload.cpp:1761 + llvm::SaveAndRestore DisableIITracking( + S.RebuildingImmediateInvocation, true); + I don't think R

[PATCH] D85607: CfgTraits: add CfgInstructionRef

2020-08-14 Thread Nicolai Hähnle via Phabricator via cfe-commits
nhaehnle marked an inline comment as done. nhaehnle added inline comments. Comment at: llvm/include/llvm/CodeGen/MachineCfgTraits.h:100 +// provide one at all. We don't want to lay a subtle performance trap here. +abort(); + } arsenm wrote: > llvm_unreac

[PATCH] D85607: CfgTraits: add CfgInstructionRef

2020-08-14 Thread Nicolai Hähnle via Phabricator via cfe-commits
nhaehnle updated this revision to Diff 285711. nhaehnle added a comment. - use llvm_unreachable Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85607/new/ https://reviews.llvm.org/D85607 Files: clang/include/clang/Analysis/Analyses/Dominators.h

[PATCH] D67422: [analyzer] NFC: Move path diagnostic consumer implementations to libAnalysis.

2020-08-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D67422#2216137 , @NoQ wrote: > I agree that there's something here and also that it's not that > urgent/critical to rename things at this point. It's not that people suffer > horribly from having to link to only some of thes

[PATCH] D67422: [analyzer] NFC: Move path diagnostic consumer implementations to libAnalysis.

2020-08-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. Unless anyone else objects, I'm happy to see this landed! Nice work! ^-^ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67422/new/ https://reviews.llvm.org/D67422 ___ cfe-commits mai

[PATCH] D85601: Fixes an assertion when IntRange processes a throw expression

2020-08-14 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 285704. Mordante marked an inline comment as done. Mordante added a comment. Addresses review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85601/new/ https://reviews.llvm.org/D85601 Files: clang/lib/Sema/SemaChecking.cpp clang/test/

[clang-tools-extra] caac40f - [clang-tools-extra] Added missing comma

2020-08-14 Thread via cfe-commits
Author: zacharyselk Date: 2020-08-14T12:27:30-06:00 New Revision: caac40fa5a6158aad93a20eb9aae82513fc5a368 URL: https://github.com/llvm/llvm-project/commit/caac40fa5a6158aad93a20eb9aae82513fc5a368 DIFF: https://github.com/llvm/llvm-project/commit/caac40fa5a6158aad93a20eb9aae82513fc5a368.diff L

[PATCH] D85978: [clang-tools-extra] Added missing comma

2020-08-14 Thread Zachary Selk via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcaac40fa5a61: [clang-tools-extra] Added missing comma (authored by zacharyselk). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85978/new/ https://reviews.ll

[PATCH] D81254: [analyzer] Produce symbolic values for C-array elements

2020-08-14 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. Hey, folk, welcome to https://reviews.llvm.org/D85984 I've moved the logic of this checker in `PthreadLockChecker` Should this revision be //closed //or //rejected //somehow? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81254/new/ https://reviews.llvm.or

[PATCH] D85984: [analyzer] Add a new checker alpha.cplusplus.CPlusPlus11Lock

2020-08-14 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov created this revision. ASDenysPetrov added reviewers: NoQ, vsavchenko, xazax.hun, dcoughlin. ASDenysPetrov added a project: clang. Herald added subscribers: cfe-commits, steakhal, martong, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, balogha

[PATCH] D85981: [clang][Modules] Use File Names Instead of inodes As Loaded Module Keys

2020-08-14 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Overall, looks like a reasonable approach to solve inode reuse. The problem with filenames is that they might not be canonicalized and the same file can be known by different filenames. I'm trying to think through the consequences in the following scenarios: - same nam

[PATCH] D83088: Introduce CfgTraits abstraction

2020-08-14 Thread Nicolai Hähnle via Phabricator via cfe-commits
nhaehnle added a comment. In D83088#2213886 , @dblaikie wrote: > In D83088#2213864 , @nhaehnle wrote: > >> In D83088#2213802 , @dblaikie wrote: >> >>> In D83088#2213797

[PATCH] D85706: [compiler-rt] Compile assembly files as ASM not C

2020-08-14 Thread Raul Tambre via Phabricator via cfe-commits
tambre added a comment. In D85706#2214009 , @phosek wrote: > One concern I have with this change is that we may not always consistently > update CMAKE_ASM_FLAGS or set CMAKE_ASM_COMPILER. This wouldn't make a > difference before, but it'll with this chan

[PATCH] D85706: [compiler-rt] Compile assembly files as ASM not C

2020-08-14 Thread Raul Tambre via Phabricator via cfe-commits
tambre updated this revision to Diff 285692. tambre added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Pass CMAKE_ASM_COMPILER to compiler-rt in runtime build Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85706/n

[PATCH] D85981: [clang][Modules] Use File Names Instead of inodes As Loaded Module Keys

2020-08-14 Thread Robert Widmann via Phabricator via cfe-commits
CodaFi created this revision. CodaFi added reviewers: vsapsai, Bigcheese, doug.gregor. CodaFi added a project: clang. Herald added subscribers: cfe-commits, dexonsmith. CodaFi requested review of this revision. The ModuleManager's use of FileEntry nodes as the keys for its map of loaded modules is

[PATCH] D85978: [clang-tools-extra] Added missing comma

2020-08-14 Thread Kamau Bridgeman via Phabricator via cfe-commits
kamaub accepted this revision. kamaub added a comment. This revision is now accepted and ready to land. This LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85978/new/ https://reviews.llvm.org/D85978

[PATCH] D74361: [Clang] Undef attribute for global variables

2020-08-14 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. In D74361#2218294 , @erichkeane wrote: > Yep! Declaring a global variable that isn't 'extern' with an incomplete type > is disallowed anyway, so if you call RequireCompleteType, you're likely just > diagnosing that early

[PATCH] D85879: [OpenMP] Overload `std::isnan` and friends multiple times for the GPU

2020-08-14 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added inline comments. Comment at: clang/lib/Headers/__clang_cuda_cmath.h:85 +//(note that we do not create implicit base functions here). To avoid +//this clash we add a new trait to some of them that is always true +//(thi

[PATCH] D85601: Fixes an assertion when IntRange processes a throw expression

2020-08-14 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 3 inline comments as done. Mordante added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:10317-10320 IntRange L = GetExprRange(C, CO->getTrueExpr(), MaxWidth, InConstantContext); IntRange R = GetExprRange(C, CO->getFalseEx

[PATCH] D85612: [Sema] Use proper integral cast for an enumerate with a fixed bool type

2020-08-14 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 285685. Mordante added a comment. Addresses review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85612/new/ https://reviews.llvm.org/D85612 Files: clang/lib/Sema/SemaCast.cpp clang/test/CXX/drs/dr23xx.cpp clang/test/CodeGen/enum-bo

[PATCH] D84415: [analyzer][StdLibraryFunctionsChecker] Add POSIX pthread handling functions

2020-08-14 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Now I've update the patch to remove all the `if`s. And the optional types are now implicitly handled, so no such mistakes can be done that I had done previously. However, the patch is getting to affect the core of this Checker, so, perhaps I should split this into two p

[PATCH] D84415: [analyzer][StdLibraryFunctionsChecker] Add POSIX pthread handling functions

2020-08-14 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 285682. martong added a comment. - Use Optionals through the Signature Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84415/new/ https://reviews.llvm.org/D84415 Files: clang/lib/StaticAnalyzer/Checkers/StdLib

[PATCH] D85474: Add -fbinutils-version= to gate ELF features on the specified binutils version

2020-08-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 285681. MaskRay edited the summary of this revision. MaskRay added a comment. Herald added a subscriber: kristof.beyls. Add release note Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85474/new/ https://reviews.

[PATCH] D83071: Add support for options with two flags for controlling the same field.

2020-08-14 Thread Michael Spencer via Phabricator via cfe-commits
Bigcheese accepted this revision. Bigcheese added a comment. lgtm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83071/new/ https://reviews.llvm.org/D83071 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D85977: [release][docs] Update contributions to LLVM 11 for SVE.

2020-08-14 Thread Thorsten via Phabricator via cfe-commits
tschuett added inline comments. Comment at: llvm/docs/ReleaseNotes.rst:162 + svfloat64_t vout = svadd_x(Pg, vx, vy); +svst1(Pg, &out[i], vout); + } Nit: indentation? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85977/new/ https:/

[PATCH] D85474: Add -fbinutils-version= to gate ELF features on the specified binutils version

2020-08-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D85474#2217598 , @jhenderson wrote: > Looks like there's only an `llc` test, but the option is in clang too? Should > we have a test there? There are generally some dotted edges in the testing of such MC level options. For op

[PATCH] D85474: Add -fbinutils-version= to gate ELF features on the specified binutils version

2020-08-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: clang/include/clang/Driver/Options.td:3307-3310 +def fbinutils_version_EQ : Joined<["-"], "fbinutils-version=">, Group, + HelpText<"Produced object files can use ELF features only supported by l

[PATCH] D85977: [release][docs] Update contributions to LLVM 11 for SVE.

2020-08-14 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli updated this revision to Diff 285678. fpetrogalli added a comment. Added context to the diff. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85977/new/ https://reviews.llvm.org/D85977 Files: clang/test/CodeGen/aarch64-sve-acle-example.cpp llvm/docs/ReleaseNotes.rst Inde

[PATCH] D85612: [Sema] Use proper integral cast for an enumerate with a fixed bool type

2020-08-14 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 2 inline comments as done. Mordante added inline comments. Comment at: clang/test/AST/ast-dump-enum-bool.cpp:1 +// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-unknown -fsyntax-only -ast-dump %s | FileCheck %s + rsmith wrote: > I don't think

[PATCH] D85978: [clang-tools-extra] Added missing comma

2020-08-14 Thread Zachary Selk via Phabricator via cfe-commits
zacharyselk created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous. Herald added a project: clang. zacharyselk requested review of this revision. The new diagnostic tool (D85545 ) caught a missing comma, adding one to

[PATCH] D85977: [release][docs] Update contributions to LLVM 11 for SVE.

2020-08-14 Thread Francesco Petrogalli via Phabricator via cfe-commits
fpetrogalli created this revision. Herald added subscribers: llvm-commits, cfe-commits, tschuett. Herald added projects: clang, LLVM. fpetrogalli requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D85977 Files: clang/test/CodeGen/aarch64-sve-acle-

[PATCH] D85473: [Clang] Add option to allow marking pass-by-value args as noalias.

2020-08-14 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85473/new/ https://reviews.llvm.org/D85473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[PATCH] D85798: Split Preprocessor/init.c test. NFC.

2020-08-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Preprocessor/init-ppc.c:390 +// PPC:#define __ppc__ 1 +// +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-ibm-aix7.1.0.0 -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC-AIX %s -

[PATCH] D74361: [Clang] Undef attribute for global variables

2020-08-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Yep! Declaring a global variable that isn't 'extern' with an incomplete type is disallowed anyway, so if you call RequireCompleteType, you're likely just diagnosing that early. You MIGHT have to do some work to allow: struct S; extern S foo __attribute__((loade

[PATCH] D74361: [Clang] Undef attribute for global variables

2020-08-14 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. In D74361#2218258 , @erichkeane wrote: > I did a little debugging, and the problem is the template itself isn't a > complete type That's clear cut then, thanks. This patch was limited to trivially constructible types, an

[PATCH] D85810: [clang] Pass-through remarks options to lld

2020-08-14 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:71 + + bool isLLD = llvm::sys::path::filename(LinkerPath) == "ld.lld" || + llvm::sys::path::stem(LinkerPath) != "ld.lld"; MaskRay wrote: > Checking the path is

[PATCH] D74361: [Clang] Undef attribute for global variables

2020-08-14 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I did a little debugging, and the problem is the template itself isn't a complete type until you require it with RequireCompleteType. You have this same problem with incomplete types: https://godbolt.org/z/hvf3M4 I would suspect you either add a RequireCompleteType

[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-08-14 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D81272#2218175 , @aaron.ballman wrote: > While I agree with your observation about data and flow sensitivity, I > approved on the belief that the check as-is provides enough utility to > warrant adding it as-is. If someone

[PATCH] D71199: [clang-tidy] New check cppcoreguidelines-prefer-member-initializer

2020-08-14 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 285657. baloghadamsoftware added a comment. Updated according to a comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71199/new/ https://reviews.llvm.org/D71199 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/CMakeLists.txt

[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-08-14 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 285656. baloghadamsoftware added a comment. Tests andd for not yet handled cases. Known limiatations included in the docs. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81272/new/ https://reviews.llvm.org/D81272 Files: clang-tools-extr

[PATCH] D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary

2020-08-14 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a comment. In D82317#2212145 , @jdoerfert wrote: > In D82317#2211643 , @guiand wrote: > >> After discussing with @eugenis, for the meantime it might be best to do the >> following: >> >> - Change the

[PATCH] D74361: [Clang] Undef attribute for global variables

2020-08-14 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. In D74361#2218143 , @erichkeane wrote: > Also, see this bug: This crashes immediately when used on a template > instantiation: https://bugs.llvm.org/show_bug.cgi?id=47169 Thanks for the bug report! Template instantiation

[PATCH] D81254: [analyzer] Produce symbolic values for C-array elements

2020-08-14 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @steakhal > If index1 and index2 has the same value, we should not be confident that the > x == y holds. Thanks! Now I see. Shame on me =) > We know where it points to (aka. the pointer's value is conjured), but we > don't know what the value if there. Absolute

[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-08-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D81272#2218173 , @whisperity wrote: > In D81272#2218050 , @aaron.ballman > wrote: > >> Thanks to the new info, I think the check basically LGTM. Can you add some >> negative tests

[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-08-14 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D81272#2218050 , @aaron.ballman wrote: > Thanks to the new info, I think the check basically LGTM. Can you add some > negative tests and documentation wording to make it clear that the check > doesn't currently handle all

[PATCH] D80514: [clang-tidy] modernize-use-trailing-return-type support for C++20 concepts and decltype

2020-08-14 Thread Bernhard Manfred Gruber via Phabricator via cfe-commits
bernhardmgruber marked 12 inline comments as done. bernhardmgruber added a comment. Thank you for the time to review this! Could you please also commit it for me? Thank you! Comment at: clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp:430 + AT->getKe

[PATCH] D81272: [clang-tidy] New check `bugprone-redundant-branch-condition`

2020-08-14 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. In D81272#2218090 , @baloghadamsoftware wrote: > In D81272#2218050 , @aaron.ballman > wrote: >

[PATCH] D84415: [analyzer][StdLibraryFunctionsChecker] Add POSIX pthread handling functions

2020-08-14 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added a comment. In D84415#2218084 , @balazske wrote: > Even some macro-like construct can improve readability. The current way of > adding functions is source of copy-paste errors because more things are

  1   2   >