[PATCH] D124816: [Tooling] use different FileManager for each CWD

2022-05-06 Thread Shi Chen via Phabricator via cfe-commits
Kale added a comment. In D124816#3494243 , @dexonsmith wrote: > Two high-level comments: > > - Making these functions `virtual` makes it harder to reason about possible > implementations, but I don't think that's necessary for what you're doing > here.

[PATCH] D125037: [pseudo] Add fuzzer for the pseudoparser.

2022-05-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked an inline comment as done. sammccall added inline comments. Comment at: clang-tools-extra/pseudo/fuzzer/Fuzzer.cpp:81 + bool PrintForest = false; + unsigned O = 1; + for (int I = 1; I < *Argc; ++I) { hokein wrote: > nit: I'd suggest using anot

[clang-tools-extra] 1616bd9 - [pseudo] Add fuzzer for the pseudoparser.

2022-05-06 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-05-06T09:22:28+02:00 New Revision: 1616bd9ef4eb46a340a8765eab440f99e9008003 URL: https://github.com/llvm/llvm-project/commit/1616bd9ef4eb46a340a8765eab440f99e9008003 DIFF: https://github.com/llvm/llvm-project/commit/1616bd9ef4eb46a340a8765eab440f99e9008003.diff LO

[PATCH] D125037: [pseudo] Add fuzzer for the pseudoparser.

2022-05-06 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. sammccall marked an inline comment as done. Closed by commit rG1616bd9ef4eb: [pseudo] Add fuzzer for the pseudoparser. (authored by sammccall). Changed prior to commit: https://reviews.llvm.org/D125037?vs=427421&id=427542

[PATCH] D125037: [pseudo] Add fuzzer for the pseudoparser.

2022-05-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This adds a false dependency between check-clang-pseudo and all of LLVM via the FuzzMutate library. (We use FuzzerCLI.h, but there's also a bunch of utilities for fuzzing IR). I'll try to split that library up to avoid the false dependency in a followup. Repository:

[PATCH] D124983: [HLSL} add -fcgl option flag.

2022-05-06 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 427544. python3kgae marked 2 inline comments as done. python3kgae added a comment. Add emit_pristine_llvm to make fcgl easier to understand. Also change unit test to lib test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D125078: Implement a feature to show line numbers in diagnostics

2022-05-06 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui created this revision. Herald added a project: All. ken-matsui requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. I implemented a feature to show line numbers with left margins in diagnostics like GCC-9 does. Ref: https://

[PATCH] D125078: Implement a feature to show line numbers in diagnostics

2022-05-06 Thread Ken Matsui via Phabricator via cfe-commits
ken-matsui updated this revision to Diff 427546. ken-matsui added a comment. Remove unnecessary includes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125078/new/ https://reviews.llvm.org/D125078 Files: clang/include/clang/Basic/DiagnosticOption

[PATCH] D124658: [analyzer] Canonicalize SymIntExpr so the RHS is positive when possible

2022-05-06 Thread Balázs Benics via Phabricator via cfe-commits
steakhal reopened this revision. steakhal added a comment. This revision is now accepted and ready to land. This patch triggers a crash with this minimized example. assertion at L205: `"The result operation type must have at least the same number of bits as its operands."` // build/bin/clang -

[PATCH] D124435: [X86] Always extend the integer parameters in callee

2022-05-06 Thread LiuChen via Phabricator via cfe-commits
LiuChen3 updated this revision to Diff 427551. LiuChen3 added a comment. Use `-mextend-small-integers=` instead of boolean option Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124435/new/ https://reviews.llvm.org/D124435 Files: clang/docs/ClangC

[PATCH] D125081: [FuzzMutate] Split out FuzzerCLI library that doesn't depend on IR.

2022-05-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: hokein, igor-laevsky. Herald added subscribers: sdasgup3, wenzhicui, wrengr, Chia-hungDuan, dcaballe, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, mgester, arpith-jacob, antia

[PATCH] D125082: [CMake] Include llvm-debuginfod-find in Fuchsia toolchain

2022-05-06 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: mysterymath, haowei, leonardchan. Herald added subscribers: abrachet, mgorny. Herald added a project: All. phosek requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Gi

[PATCH] D125081: [FuzzMutate] Split out FuzzerCLI library that doesn't depend on IR.

2022-05-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. I'm happy to move FuzzerCLI to a separate directory (and avoid PARTIAL_SOURCES_INTENDED) if you prefer. It's a bunch more mechanical changes and will break secondary build systems (gn, bazel), so if so let's agree on a name first. Repository: rG LLVM Github Monore

[clang] a65afce - [flang][driver] Add support for -save-temps

2022-05-06 Thread Andrzej Warzynski via cfe-commits
Author: Andrzej Warzynski Date: 2022-05-06T08:41:29Z New Revision: a65afce731c2fa91effcfa5d4917d6ad90a28bf0 URL: https://github.com/llvm/llvm-project/commit/a65afce731c2fa91effcfa5d4917d6ad90a28bf0 DIFF: https://github.com/llvm/llvm-project/commit/a65afce731c2fa91effcfa5d4917d6ad90a28bf0.diff

[PATCH] D124669: [flang][driver] Add support for -save-temps

2022-05-06 Thread Andrzej Warzynski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa65afce731c2: [flang][driver] Add support for -save-temps (authored by awarzynski). Changed prior to commit: https://reviews.llvm.org/D124669?vs=427367&id=427561#toc Repository: rG LLVM Github Monore

[PATCH] D124658: [analyzer] Canonicalize SymIntExpr so the RHS is positive when possible

2022-05-06 Thread Mikael Holmén via Phabricator via cfe-commits
uabelho added a comment. In D124658#3495973 , @steakhal wrote: > This patch triggers a crash with this minimized example. > assertion at L205: `"The result operation type must have at least the same > number of bits as its operands."` > [...] > Please in

[PATCH] D125084: [test, x86] Fix spurious x86-target-features.c failure

2022-05-06 Thread Thomas Preud'homme via Phabricator via cfe-commits
thopre created this revision. thopre added reviewers: sconstab, craig.topper, andrew.w.kaylor, zbrid, chandlerc. Herald added subscribers: StephenFan, pengfei. Herald added a project: All. thopre requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commi

[PATCH] D123676: [clang-format] Fix WhitespaceSensitiveMacros not being honoured when macro closing parenthesis is followed by a newline.

2022-05-06 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius updated this revision to Diff 427566. curdeius added a comment. Simplify. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123676/new/ https://reviews.llvm.org/D123676 Files: clang/lib/Format/FormatTokenLexer.cpp clang/

[PATCH] D124715: Use QoS class Utility for ThreadPriority::Low on Mac

2022-05-06 Thread Stefan Haller via Phabricator via cfe-commits
stefanhaller updated this revision to Diff 427567. stefanhaller added a comment. Updated the patch to have both Background and Low As discussed, we provide both Background and Low now, with Low being the default; Linux and Windows still implement both the same (as Background), this could be chang

[PATCH] D123676: [clang-format] Fix WhitespaceSensitiveMacros not being honoured when macro closing parenthesis is followed by a newline.

2022-05-06 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius marked 5 inline comments as done. curdeius added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:23545 + // Newlines are important here. + EXPECT_EQ("FOO(1+2 );\n", format("FOO(1+2 );\n", Style)); + EXPECT_EQ("FOO(1+2 )\n", format("FOO(1+2 )\n",

[PATCH] D110685: [HIPSPV][4/4] Add option to use llc to emit SPIR-V

2022-05-06 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Herald added a subscriber: MaskRay. Herald added a project: All. I think it might make more sense to use the option `-fno-llvm-spirv` as we don't advertise `llc` as a tool to the developers but `llvm-spirv` we do. Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D125085: [clang-format] Correctly handle SpaceBeforeParens for builtins.

2022-05-06 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius created this revision. curdeius added reviewers: MyDeveloperDay, HazardyKnusperkeks, owenpan. Herald added a project: All. curdeius requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. That's a partial fix for https://github.com/llvm/ll

[PATCH] D124715: Use QoS class Utility for ThreadPriority::Low on Mac

2022-05-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. Thanks a lot, this version looks good to me and I'll follow up with a flag for clangd. In D124715#3493493 , @stefanhaller wrote: > In D124715#3491985

[PATCH] D125081: [FuzzMutate] Split out FuzzerCLI library that doesn't depend on IR.

2022-05-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. This looks a reasonable split to me! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125081/new/ https://reviews.llvm.org/D125081 ___

[PATCH] D124091: [clang][AArch64][SVE] Implement conditional operator for SVE vectors

2022-05-06 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett added a comment. > I appreciate that I'm pulling your change out of a list of 80 without that > much evidence so if it's clearly not the issue just let me know. My guess was incorrect, I've tracked this down to a different change. Sorry for the noise. Repository: rG LLVM Githu

[PATCH] D124715: Use QoS class Utility for ThreadPriority::Low on Mac

2022-05-06 Thread Stefan Haller via Phabricator via cfe-commits
stefanhaller updated this revision to Diff 427577. stefanhaller added a comment. - Added a comment to setThreadBackgroundPriority - Improved comments for ThreadPriority enum - Add FIXME comments for Windows and Linux Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D123243: [pseudo] Strip directives from a token stream

2022-05-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 2 inline comments as done. sammccall added inline comments. Comment at: clang-tools-extra/pseudo/lib/DirectiveTree.cpp:373 +case DirectiveTree::Chunk::K_Empty: + break; +} hokein wrote: > return, otherwise we we hit the unreachable c

[PATCH] D123243: [pseudo] Strip directives from a token stream

2022-05-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 427581. sammccall marked an inline comment as done. sammccall added a comment. rebase add include to testcase rename preprocess => strip-includes, and testcase move print directivetree test to strip-includes.c fix tests to not cook before parsing directivetr

[clang] da5b5ae - Revert "[analyzer] Canonicalize SymIntExpr so the RHS is positive when possible"

2022-05-06 Thread Balazs Benics via cfe-commits
Author: Balazs Benics Date: 2022-05-06T12:13:51+02:00 New Revision: da5b5ae852c45236620e1dd8d498b2c49fa5c855 URL: https://github.com/llvm/llvm-project/commit/da5b5ae852c45236620e1dd8d498b2c49fa5c855 DIFF: https://github.com/llvm/llvm-project/commit/da5b5ae852c45236620e1dd8d498b2c49fa5c855.diff

[PATCH] D124658: [analyzer] Canonicalize SymIntExpr so the RHS is positive when possible

2022-05-06 Thread Balázs Benics via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGda5b5ae852c4: Revert "[analyzer] Canonicalize SymIntExpr so the RHS is positive when possible" (authored by steakhal). Changed prior to commit: https://reviews.llvm.org/D124658?vs=427340&id=427582#toc

[clang-tools-extra] 7dc3c61 - [pseudo] Strip directives from a token stream

2022-05-06 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-05-06T12:15:08+02:00 New Revision: 7dc3c6190ec7191dd104fa5158fe0ee32e9b0c49 URL: https://github.com/llvm/llvm-project/commit/7dc3c6190ec7191dd104fa5158fe0ee32e9b0c49 DIFF: https://github.com/llvm/llvm-project/commit/7dc3c6190ec7191dd104fa5158fe0ee32e9b0c49.diff LO

[PATCH] D123243: [pseudo] Strip directives from a token stream

2022-05-06 Thread Sam McCall 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 rG7dc3c6190ec7: [pseudo] Strip directives from a token stream (authored by sammccall). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D121838: Generalize "check-all" umbrella targets, use for check-clang-tools

2022-05-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a subscriber: ldionne. sammccall added a comment. In D121838#3470478 , @ldionne wrote: > I think @phosek is the right person to look at this. I looked at it and it > seems fine, but I don't know how the runtimes tests are setup well enoug

[PATCH] D125050: [OpenMP] Try to Infer target triples using the offloading architecture

2022-05-06 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam added a comment. Looks good to me. Will it work with `-fno-openmp`? Sometimes `-fno-openmp` is used by the end-user to override system provided `-fopenmp` flag for some translation units. Please have a look at following examples: // RUN: %clang -### -target x86_64-linux-gnu \ // R

[PATCH] D121838: Generalize "check-all" umbrella targets, use for check-clang-tools

2022-05-06 Thread Sam McCall via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG7cc8377f2c57: Generalize "check-all" umbrella targets, use for che

[PATCH] D124525: [OpenMP][ClangLinkerWrapper] Extending linker wrapper to embed metadata for multi-arch fat binaries

2022-05-06 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam added a comment. In D124525#3491170 , @jhuber6 wrote: > I'm suggesting instead we define a new `__tgt_device_image` and a new > `__tgt_register_lib` function to support this. This new `__tgt_device_image` > will simply contain a pointer to an o

[PATCH] D124658: [analyzer] Canonicalize SymIntExpr so the RHS is positive when possible

2022-05-06 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource added a comment. I am looking into the crashes. The simplest solution is to not apply normalization in such a situation, and I am slowly converting to that solution. But, want to understand better how such values are produced in the first case, and if performing norm

[PATCH] D125012: [clang] createInvocationFromCommandLine -> createInvocation, delete former. NFC

2022-05-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks, lgtm! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125012/new/ https://reviews.llvm.org/D125012 __

[PATCH] D124674: [analyzer] Indicate if a parent state is infeasible

2022-05-06 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added a comment. In D124674#3491710 , @NoQ wrote: > Yes, we've discussed this before, and I'm very much in favor of this change. > This is assertion removal, and the assertion has been really useful back

[PATCH] D124674: [analyzer] Indicate if a parent state is infeasible

2022-05-06 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 427594. martong marked an inline comment as done. martong added a comment. - Add explanatory comment, rename to PosteriorlyOverconstrained Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124674/new/ https://revie

[PATCH] D125085: [clang-format] Correctly handle SpaceBeforeParens for builtins.

2022-05-06 Thread Nathan Sidwell via Phabricator via cfe-commits
urnathan added a comment. cool Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125085/new/ https://reviews.llvm.org/D125085 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D125050: [OpenMP] Try to Infer target triples using the offloading architecture

2022-05-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added a comment. In D125050#3496289 , @saiislam wrote: > Looks good to me. > > Will it work with `-fno-openmp`? Sometimes `-fno-openmp` is used by the > end-user to override system provided `-fopenmp` fla

[PATCH] D124977: [NFC][Clang] Modify expect of fail test or XFAIL because CSKY align is different

2022-05-06 Thread Renato Golin via Phabricator via cfe-commits
rengolin added inline comments. Comment at: clang/test/Sema/builtin-alloca-with-align.c:32 void test8(void) { +#if defined(__csky__) __builtin_alloca_with_align(sizeof(__INT64_TYPE__), __alignof__(__INT64_TYPE__)); // expected-warning {{second argument to __builtin_alloca_w

[PATCH] D125050: [OpenMP] Try to Infer target triples using the offloading architecture

2022-05-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 427599. jhuber6 added a comment. Add test for disabling openmp with `-fno-openmp` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125050/new/ https://reviews.llvm.org/D125050 Files: clang/include/clang/Basic/D

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. It looks like there's still something not quite right because it's warning on some instances but not others and I'm not certain why. Can you investigate? Comment at: clang/test/Preprocessor/line-directive.c:33-34 # 42 "foo" 2 // expected-error {

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-05-06 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda added a comment. @Anastasia @tra apologies for a late reply, I'm catching up with the thread after holidays. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124382/new/ https://reviews.llvm.org/D124382 _

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-05-06 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda added a comment. In D124382#3480600 , @Anastasia wrote: > > And I think we could add this feature in a very light way for example by > reserving the numbers from the clang `LangAS` enum to be used with the > language address spaces in the p

[PATCH] D124674: [analyzer] Indicate if a parent state is infeasible

2022-05-06 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added a comment. only a few typos Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h:89-114 + // A state is infeasible if there is a contradiction among the constraints. + // An infeasible state is repre

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-05-06 Thread Jakub Chlanda via Phabricator via cfe-commits
jchlanda added inline comments. Comment at: clang/include/clang/AST/Type.h:486 + bool IsSYCLOrOpenCL = false) { +if (ASMap) { + bool IsATargetAS = false; tra wrote: > If A and B are both target AS, we fall through to

[PATCH] D124726: Suggest typoed directives in preprocessor conditionals

2022-05-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: cjdb. aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:362-365 +def warn_pp_typo_directive : Warning< + "'#%0' directive not found, did you mean '#%1'?">, + InGroup; ken-matsui

[PATCH] D121465: WIP: [clang][modules] Do not report declarations without linkage as ambiguous

2022-05-06 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 marked 2 inline comments as done. jansvoboda11 added a comment. In D121465#3384825 , @vsapsai wrote: > My concern with this approach is I'm not sure if > `isEquivalentInternalLinkageDeclaration` is a desired long-term solution for > anonymo

[PATCH] D121465: WIP: [clang][modules] Do not report declarations without linkage as ambiguous

2022-05-06 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 427603. jansvoboda11 marked an inline comment as done. jansvoboda11 added a comment. Refer to enum constant while defining another Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121465/new/ https://reviews.

[PATCH] D125088: [clangd] Add parsing for IgnoreHeaders config option

2022-05-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: sammccall, kbobyrev. Herald added subscribers: usaxena95, arphaman. Herald added a project: All. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-e

[PATCH] D124983: [HLSL] add -fcgl option flag.

2022-05-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from a tiny nit. Comment at: clang/include/clang/Driver/Options.td:6768-6769 + "Same as -S + -emit-llvm + -disable-llvm-passes.">; +def fcg

[PATCH] D123009: [Sema] Enum conversion warning when one signed and other unsigned.

2022-05-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from some minor corrections. Btw, do you need someone to land this on your behalf? If so, what name and email address would you like used for patch attribution? ===

[clang] 43d8ffe - Fix underlining length; NFC

2022-05-06 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-05-06T08:47:45-04:00 New Revision: 43d8ffeeb1f2ba68e51652ee50da8cf5bf49fdfd URL: https://github.com/llvm/llvm-project/commit/43d8ffeeb1f2ba68e51652ee50da8cf5bf49fdfd DIFF: https://github.com/llvm/llvm-project/commit/43d8ffeeb1f2ba68e51652ee50da8cf5bf49fdfd.diff

[PATCH] D121120: [clang-tidy] New check for safe usage of `std::optional` and like types.

2022-05-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 10 inline comments as done. ymandel added a comment. Thanks for the review! Comment at: clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp:39-45 + using dataflow::ControlFlowContext; + using dataflow::DataflowAnalysisContext; + using dataf

[PATCH] D121120: [clang-tidy] New check for safe usage of `std::optional` and like types.

2022-05-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 427607. ymandel added a comment. address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121120/new/ https://reviews.llvm.org/D121120 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyMo

[PATCH] D124674: [analyzer] Indicate if a parent state is infeasible

2022-05-06 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h:99 + // recognise that a parent is infeasible only *after* a new and more specific + // constraint and its negation is evaluated. + // Yeah, thx, I

[PATCH] D124702: [MSVC] Add support for pragma function

2022-05-06 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. It needs tests for the warnings about badly formed pragmas, and for pragmas outside file/namespace scope. Comment at: clang/lib/Parse/ParsePragma.cpp:3561 << "intrinsic"; return; } steplong wrote: > hans wrote: > > since

[PATCH] D121120: [clang-tidy] New check for safe usage of `std::optional` and like types.

2022-05-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 427610. ymandel added a comment. add fixme Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121120/new/ https://reviews.llvm.org/D121120 Files: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp cla

[PATCH] D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables

2022-05-06 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.h:24 +/// For the user-facing documentation see: +/// http://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines-const.html +class ConstCorrectnessCheck : public ClangTidyChe

[PATCH] D121120: [clang-tidy] New check for safe usage of `std::optional` and like types.

2022-05-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp:84 + if (!BlockToOutputState || + BlockToOutputState->size() <= Context->getCFG().getExit().getBlockID()) +return; ymandel wrote: > sgatev

[PATCH] D125091: [clang][dataflow][NFC] Clarify guarantees on returned vector size for `runDataflowAnalysis`.

2022-05-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: sgatev, xazax.hun. Herald added subscribers: tschuett, steakhal, rnkovacs. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. Adjusts the comment to specify that the output vector's size mat

[PATCH] D124866: [CUDA][HIP] support __noinline__ as keyword

2022-05-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I don't know how language extensions come about in CUDA or HIP -- is there an appropriate standards body (or something similar) that's aware of this extension and supports it? The changes should likely come with a release note entry about the new functionality, a

[PATCH] D124221: Reimplement `__builtin_dump_struct` in Sema.

2022-05-06 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2441 +well as aggregate structures, ``void*`` (printed with ``%p``), and ``const +char*`` (printed with ``%s``). A ``*%p`` specifier will be used for a field +that Clang doesn't know how to format, an

[PATCH] D123812: [CUDA] Add wrapper code generation for registering CUDA images

2022-05-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123812/new/ https://reviews.llvm.org/D123812 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D121120: [clang-tidy] New check for safe usage of `std::optional` and like types.

2022-05-06 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev accepted this revision. sgatev added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UncheckedOptionalAccessCheck.cpp:39-45 + using dataflow::ControlFlowContext; + using dataflow::DataflowAnalysisContext; + using dataflow::DataflowAnalysisState; + u

[PATCH] D124996: [clang][preprocessor] Fix unsigned-ness of utf8 char literals

2022-05-06 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 427614. tbaeder marked 2 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124996/new/ https://reviews.llvm.org/D124996 Files: clang/docs/ReleaseNotes.rst clang/lib/Lex/PPExpressions.cpp clang/test/Lexer/utf8-char-literal.c

[PATCH] D124996: [clang][preprocessor] Fix unsigned-ness of utf8 char literals

2022-05-06 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/Lexer/utf8-char-literal.cpp:39 +# if defined(CHAR8_T) +#if u8'\xff' == '\xff' // expected-warning {{right side of operator converted from negative value to unsigned}} +# error Something's not right.

[PATCH] D113779: [Clang] Add mfp16, mfp16fml and mdotprod flags for ARM target features.

2022-05-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. Herald added a subscriber: MaskRay. Herald added a project: All. In D113779#3207936 , @SjoerdMeijer wrote: >> If anybody has contacts to GCC that would be very helpful. Unfortunately I >> don't think I will be able to drive this.

[PATCH] D121120: [clang-tidy] New check for safe usage of `std::optional` and like types.

2022-05-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. In D121120#3494137 , @ymandel wrote: > In D121120#3494085 , @xazax.hun > wrote: > >> Most checks in Clang Tidy will run relatively quickly as they usually can do >> most/all of their wor

[clang] a45647d - [clang][dataflow][NFC] Clarify guarantees on returned vector size for `runDataflowAnalysis`.

2022-05-06 Thread Yitzhak Mandelbaum via cfe-commits
Author: Yitzhak Mandelbaum Date: 2022-05-06T13:30:01Z New Revision: a45647d82b728a7ccdfe28338bb8a115dee7a735 URL: https://github.com/llvm/llvm-project/commit/a45647d82b728a7ccdfe28338bb8a115dee7a735 DIFF: https://github.com/llvm/llvm-project/commit/a45647d82b728a7ccdfe28338bb8a115dee7a735.diff

[PATCH] D125091: [clang][dataflow][NFC] Clarify guarantees on returned vector size for `runDataflowAnalysis`.

2022-05-06 Thread Yitzhak Mandelbaum 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 rGa45647d82b72: [clang][dataflow][NFC] Clarify guarantees on returned vector size for… (authored by ymandel). Repository: rG LLVM Github Monorepo C

[PATCH] D123032: [clang][dataflow] Exclude protobuf types from modeling in the environment.

2022-05-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as done. ymandel added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:513 + const RecordDecl *RD = BaseTy->getDecl(); + if (RD->getIdentifier() == nullptr || RD->getName() != "Message") +return false; -

[PATCH] D124966: Thread safety analysis: Handle compound assignment and ->* overloads

2022-05-06 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert marked 2 inline comments as done. aaronpuchert added inline comments. Comment at: clang/lib/Analysis/ThreadSafety.cpp:1994 + case OO_Equal: + case OO_PlusEqual: + case OO_MinusEqual: aaron.ballman wrote: > If we're going to be handling

[PATCH] D124966: Thread safety analysis: Handle compound assignment and ->* overloads

2022-05-06 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert updated this revision to Diff 427617. aaronpuchert marked an inline comment as done. aaronpuchert added a comment. Also consider `++` and `--` as writing, test all operators. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124966/new/ ht

[PATCH] D125092: [OpenMP] Add basic support for properly handling static libraries

2022-05-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield, tianshilei1992. Herald added subscribers: guansong, yaxunl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. Cu

[clang] 3902ebd - [compiler-rt][builtins] Fix wrong ABI of AVR __mulqi3 & __mulhi3

2022-05-06 Thread Ben Shi via cfe-commits
Author: Ben Shi Date: 2022-05-06T13:46:49Z New Revision: 3902ebdd5793763431264259dfdca871ef453017 URL: https://github.com/llvm/llvm-project/commit/3902ebdd5793763431264259dfdca871ef453017 DIFF: https://github.com/llvm/llvm-project/commit/3902ebdd5793763431264259dfdca871ef453017.diff LOG: [comp

[PATCH] D124996: [clang][preprocessor] Fix unsigned-ness of utf8 char literals

2022-05-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/Lexer/utf8-char-literal.cpp:37-47 +#if __cplusplus == 201703L +# if defined(CHAR8_T) +#if u8'\xff' == '\xff' // expected-warning {{right side of operator converted from negative value to unsigned}} +# error So

[PATCH] D125077: [compiler-rt][builtins] Fix wrong ABI of AVR __mulqi3 & __mulhi3

2022-05-06 Thread Ben Shi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. benshi001 marked an inline comment as done. Closed by commit rG3902ebdd5793: [compiler-rt][builtins] Fix wrong ABI of AVR __mulqi3 & __mulhi3 (authored by benshi001). Herald added a project: clang. Herald added a subscriber:

[PATCH] D117229: [Analyzer] Produce SymbolCast for pointer to integer cast

2022-05-06 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 3 inline comments as done. martong added a comment. Herald added a project: All. Thanks for the review Denys, and sorry for the long delay with the update. I hope that this patch is going to complement nicely the rest of the cast patches. Comment at: clang/lib/S

[PATCH] D117229: [Analyzer] Produce SymbolCast for pointer to integer cast

2022-05-06 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 427621. martong marked 2 inline comments as done. martong added a comment. - add new assert for canonical type - remove superflous assert about makeSymbolVal Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117229/

[clang] 102824f - [clang][X86] Rename some intrinsics tests to use the *-builtins.c naming convention

2022-05-06 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2022-05-06T14:49:46+01:00 New Revision: 102824f04893452b6d1602a8d57949844b07bef9 URL: https://github.com/llvm/llvm-project/commit/102824f04893452b6d1602a8d57949844b07bef9 DIFF: https://github.com/llvm/llvm-project/commit/102824f04893452b6d1602a8d57949844b07bef9.diff

[PATCH] D124966: Thread safety analysis: Handle compound assignment and ->* overloads

2022-05-06 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert updated this revision to Diff 427623. aaronpuchert added a comment. Use 1 instead of 0 just to be sure. We don't want to trigger warnings about division by zero. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124966/new/ https://review

[PATCH] D124674: [analyzer] Indicate if a parent state is infeasible

2022-05-06 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 427625. martong marked 2 inline comments as done. martong added a comment. - Fix typos in essay Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124674/new/ https://reviews.llvm.org/D124674 Files: clang/include

[PATCH] D123009: [Sema] Enum conversion warning when one signed and other unsigned.

2022-05-06 Thread Micah Weston via Phabricator via cfe-commits
red1bluelost updated this revision to Diff 427627. red1bluelost marked 2 inline comments as done. red1bluelost added a comment. Addresses the last couple comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123009/new/ https://reviews.llvm.org/D

[PATCH] D123009: [Sema] Enum conversion warning when one signed and other unsigned.

2022-05-06 Thread Micah Weston via Phabricator via cfe-commits
red1bluelost marked an inline comment as done. red1bluelost added a comment. If that's all good, could you commit on my behalf. Here is name and email: Micah Weston (micahswes...@gmail.com) Thanks for the great reviews! It was really helpful with learning the frontend stuff. Repository: rG

[PATCH] D125094: [ARM][Thumb] Command-line option to ensure AAPCS compliant Frame Records

2022-05-06 Thread Lucas Prates via Phabricator via cfe-commits
pratlucas created this revision. Herald added subscribers: hiraditya, kristof.beyls. Herald added a project: All. pratlucas requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, MaskRay. Herald added projects: clang, LLVM. Currently the a AAPCS compliant frame rec

[PATCH] D125088: [clangd] Add parsing for IgnoreHeaders config option

2022-05-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/unittests/ConfigYAMLTests.cpp:259 + Fragment::parseYAML(YAML.code(), "config.yaml", Diags.callback()); + ASSERT_THAT(Diags.Diagnostics, IsEmpty()); + ASSERT_EQ(Results.size(), 1u); A ==

[PATCH] D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables

2022-05-06 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 427629. JonasToth added a comment. - fix documentation reference Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54943/new/ https://reviews.llvm.org/D54943 Files: clang-tools-extra/clang-tidy/misc/CMakeLists

[PATCH] D125088: [clangd] Add parsing for IgnoreHeaders config option

2022-05-06 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/unittests/ConfigYAMLTests.cpp:259 + Fragment::parseYAML(YAML.code(), "config.yaml", Diags.callback()); + ASSERT_THAT(Diags.Diagnostics, IsEmpty()); + ASSERT_EQ(Results.size(), 1u); kbobyr

[clang-tools-extra] 9fe89a1 - [clangd] Add parsing for IgnoreHeaders config option

2022-05-06 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2022-05-06T16:11:37+02:00 New Revision: 9fe89a1f0fa6d88aa4786580b89e81dc906fcc52 URL: https://github.com/llvm/llvm-project/commit/9fe89a1f0fa6d88aa4786580b89e81dc906fcc52 DIFF: https://github.com/llvm/llvm-project/commit/9fe89a1f0fa6d88aa4786580b89e81dc906fcc52.dif

[PATCH] D125094: [ARM][Thumb] Command-line option to ensure AAPCS compliant Frame Records

2022-05-06 Thread Lucas Prates via Phabricator via cfe-commits
pratlucas updated this revision to Diff 427632. pratlucas added a comment. Addressing linting messages. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125094/new/ https://reviews.llvm.org/D125094 Files: clang/include/clang/Driver/Options.td cla

[clang] 499d0b9 - [clang] createInvocationFromCommandLine -> createInvocation, delete former. NFC

2022-05-06 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-05-06T16:21:48+02:00 New Revision: 499d0b96cb52c828e7fc4d58825b5e8b3f9931c5 URL: https://github.com/llvm/llvm-project/commit/499d0b96cb52c828e7fc4d58825b5e8b3f9931c5 DIFF: https://github.com/llvm/llvm-project/commit/499d0b96cb52c828e7fc4d58825b5e8b3f9931c5.diff LO

[clang] d2405e1 - Fix lifetime of DiagnosticsEngine in diagtool.

2022-05-06 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-05-06T16:21:49+02:00 New Revision: d2405e1da5b6ee8d6568469610071d86414cdc93 URL: https://github.com/llvm/llvm-project/commit/d2405e1da5b6ee8d6568469610071d86414cdc93 DIFF: https://github.com/llvm/llvm-project/commit/d2405e1da5b6ee8d6568469610071d86414cdc93.diff LO

[PATCH] D125012: [clang] createInvocationFromCommandLine -> createInvocation, delete former. NFC

2022-05-06 Thread Sam McCall 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 rG499d0b96cb52: [clang] createInvocationFromCommandLine -> createInvocation, delete former. NFC (authored by sammccall). Changed prior to commit: ht

[PATCH] D124758: [analyzer] Implement assume in terms of assumeDual

2022-05-06 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 427635. martong added a comment. - Rebase to parent revision Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124758/new/ https://reviews.llvm.org/D124758 Files: clang/include/clang/StaticAnalyzer/Core/PathSens

[PATCH] D124758: [analyzer] Implement assume in terms of assumeDual

2022-05-06 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 427636. martong marked an inline comment as done. martong added a comment. - Remove ExprInspection checker from the test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124758/new/ https://reviews.llvm.org/D12475

[PATCH] D124758: [analyzer] Implement assume in terms of assumeDual

2022-05-06 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/test/Analysis/infeasible-crash.c:3 +// RUN: -analyzer-checker=core \ +// RUN: -analyzer-checker=alpha.unix.cstring.OutOfBounds,alpha.unix.cstring.UninitializedRead \ +// RUN: -analyzer-checker=debug.ExprInspection \ ---

  1   2   3   >