[PATCH] D128496: [clang-format] Further improve requires clause detection

2022-06-24 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:3163-3169 + default: +if (!PreviousNonComment->isTypeOrIdentifier()) { + // It's an expression. + parseRequiresExpression(RequiresToken); + return false; +} +LLVM_FALLT

[PATCH] D128499: [Clang] Fix: Restore warning inadvertently removed by D126061.

2022-06-24 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Before D126061 , Clang would warn about this code struct X { [[deprecated]] stru

[PATCH] D126061: [clang] Reject non-declaration C++11 attributes on declarations

2022-06-24 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Fix in review at https://reviews.llvm.org/D128499 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126061/new/ https://reviews.llvm.org/D126061 ___ cfe-commits mailing list cfe-comm

[PATCH] D88780: Allow interfaces to operate on in-memory buffers with no source location info.

2022-06-24 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. I'd propose to move forward here and rely on eventual post-commit review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88780/new/ h

[PATCH] D128048: Add a new clang option "-ftime-trace-path"

2022-06-24 Thread dongjunduo via Phabricator via cfe-commits
dongjunduo updated this revision to Diff 439661. dongjunduo added a comment. [Clang] rewrite test case of "-ftime-trace-path" Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128048/new/ https://reviews.llvm.org/D128048 Files: clang/include/clang/D

[PATCH] D128439: [Clang][WIP] Don't call distributeTypeAttrsFromDeclarator() on empty list.

2022-06-24 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D128439#3605266 , @nikic wrote: > Not seeing a statistically significant impact from this change: > http://llvm-compile-time-tracker.com/compare.php?from=8b6f69a4da5baaf3748798a84dd16a2481b7ca7f&to=797ba50f5fd88017925fe765427b

[PATCH] D128048: Add a new clang option "-ftime-trace-path"

2022-06-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. You may add `-ftime-trace=` instead of introducing a new spelling. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128048/new/ https://reviews.llvm.org/D128048 ___ cfe-commits mail

[PATCH] D128496: [clang-format] Further improve requires clause detection

2022-06-24 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius accepted this revision. curdeius added a comment. This revision is now accepted and ready to land. LGTM with Owen's suggestion. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:3185-3188 - default: -// It's an expression. -parseRequiresExpression(RequiresT

[PATCH] D128097: [Clang] Fix compile time regression caused by D126061.

2022-06-24 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D128097#3605307 , @nikic wrote: > @mboehme Cycle counts are very noisy, and it's pretty much impossible to > determine whether they changed by looking at a single commit, unless the > differences are huge (like 10%). In this

[clang] ac6c5c5 - Reland "[clang-repl] Recover the lookup tables of the primary context."

2022-06-24 Thread Vassil Vassilev via cfe-commits
Author: Vassil Vassilev Date: 2022-06-24T08:35:41Z New Revision: ac6c5c5e8f20d0550d99778583b83c3856ea353b URL: https://github.com/llvm/llvm-project/commit/ac6c5c5e8f20d0550d99778583b83c3856ea353b DIFF: https://github.com/llvm/llvm-project/commit/ac6c5c5e8f20d0550d99778583b83c3856ea353b.diff LO

[PATCH] D128439: [Clang][WIP] Don't call distributeTypeAttrsFromDeclarator() on empty list.

2022-06-24 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. In D128439#3607289 , @mboehme wrote: > Just a question for my understanding before I abandon the change: Shouldn't > the "instructions" count be relatively resistant to noise? (I was assuming > this is based on performance counter

[clang] a129a37 - [clang] Update Clang version from 14 to 15 in scan-build.1.

2022-06-24 Thread Frederic Cambus via cfe-commits
Author: Frederic Cambus Date: 2022-06-24T11:09:34+02:00 New Revision: a129a371610dc342402dcdd122330369b25ff247 URL: https://github.com/llvm/llvm-project/commit/a129a371610dc342402dcdd122330369b25ff247 DIFF: https://github.com/llvm/llvm-project/commit/a129a371610dc342402dcdd122330369b25ff247.dif

[PATCH] D128439: [Clang][WIP] Don't call distributeTypeAttrsFromDeclarator() on empty list.

2022-06-24 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D128439#3607350 , @nikic wrote: > In D128439#3607289 , @mboehme wrote: > >> Just a question for my understanding before I abandon the change: Shouldn't >> the "instructions" count be r

[PATCH] D128511: [clang-tidy] Make the cert/uppercase-literal-suffix-integer fully hermetic.

2022-06-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: LegalizeAdulthood, aaron.ballman. Herald added a subscriber: xazax.hun. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang-tools-extra. after the test-reorg commit (89a1d03e2b379e325daa5249411e4

[PATCH] D128512: [Driver][test] Add libclang_rt.profile{{.*}}.a tests for OpenBSD.

2022-06-24 Thread Frederic Cambus via Phabricator via cfe-commits
fcambus created this revision. fcambus added a reviewer: MaskRay. Herald added subscribers: StephenFan, krytarowski. Herald added a project: All. fcambus requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This was requested in D109244

[PATCH] D128496: [clang-format] Further improve requires clause detection

2022-06-24 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks updated this revision to Diff 439689. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128496/new/ https://reviews.llvm.org/D128496 Files: clang/lib/Format/UnwrappedLineParser.cpp clang/unittests/Format/TokenAnnotatorTest.cpp Index: clang/unittests/Format/TokenAnnot

[PATCH] D128496: [clang-format] Further improve requires clause detection

2022-06-24 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks marked 4 inline comments as done. HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:3185-3188 - default: -// It's an expression. -parseRequiresExpression(RequiresToken); -return false; c

[PATCH] D115827: [clang]: add missing Interpreter -> ClangDriverOptions dependency

2022-06-24 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. Herald added a project: All. @t184256, do we still need this? Should I commit it in case you don't have commit access? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115827/new/ https://reviews.llvm.org/D115827 __

[clang] 6546fdb - [clang] Emit SARIF Diagnostics: Create `clang::SarifDocumentWriter` interface

2022-06-24 Thread Aaron Ballman via cfe-commits
Author: Vaibhav Yenamandra Date: 2022-06-24T07:16:54-04:00 New Revision: 6546fdbe36fd1227d7f23f89fd9a9825813b3de9 URL: https://github.com/llvm/llvm-project/commit/6546fdbe36fd1227d7f23f89fd9a9825813b3de9 DIFF: https://github.com/llvm/llvm-project/commit/6546fdbe36fd1227d7f23f89fd9a9825813b3de9.

[PATCH] D109701: [clang] Emit SARIF Diagnostics: Create `clang::SarifDocumentWriter` interface

2022-06-24 Thread Aaron Ballman 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 rG6546fdbe36fd: [clang] Emit SARIF Diagnostics: Create `clang::SarifDocumentWriter` interface (authored by vaibhav.y, committed by aaron.ballman). Re

[clang] 7a3918b - Revert "[clang] Emit SARIF Diagnostics: Create `clang::SarifDocumentWriter` interface"

2022-06-24 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-06-24T07:33:07-04:00 New Revision: 7a3918b540c30cc630aaae9124c67e5e4db123c2 URL: https://github.com/llvm/llvm-project/commit/7a3918b540c30cc630aaae9124c67e5e4db123c2 DIFF: https://github.com/llvm/llvm-project/commit/7a3918b540c30cc630aaae9124c67e5e4db123c2.diff

[PATCH] D109701: [clang] Emit SARIF Diagnostics: Create `clang::SarifDocumentWriter` interface

2022-06-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman reopened this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. Unfortunately, I had to roll this back in 7a3918b540c30cc630aaae9124c67e5e4db123c2 because there's a layeri

[PATCH] D109701: [clang] Emit SARIF Diagnostics: Create `clang::SarifDocumentWriter` interface

2022-06-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. Marking as needing changes so it's clear this shouldn't be re-landed yet. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D128499: [Clang] Fix: Restore warning inadvertently removed by D126061.

2022-06-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for the quick fix! I had a question about why only one of the two interfaces needed to be updated and whether we thought that was sensible, but otherwise the changes here look correct to me. Comment at: clang/lib/Sema/SemaDecl.cpp:4633

[PATCH] D128511: [clang-tidy] Make the cert/uppercase-literal-suffix-integer fully hermetic.

2022-06-24 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128511/new/ https://reviews.llvm.org/D128511

[PATCH] D128439: [Clang][WIP] Don't call distributeTypeAttrsFromDeclarator() on empty list.

2022-06-24 Thread Dawid Jurczak via Phabricator via cfe-commits
yurai007 added a comment. Indeed, measuring performance is tricky and chasing slow downs can be challenging especially those at the level of ~0.2%-0.1% or less. Personally, every time when I need to use perf on Clang I follow those short guidelines to reduce noise and get relevant numbers: ht

[PATCH] D128248: [clang] Avoid an assertion in APValue::hasArrayFiller()

2022-06-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/AST/APValue.h:511-512 bool hasArrayFiller() const { +if (!isArray()) + return false; return getArrayInitializedElts() != getArraySize(); I think this makes the interface somewha

[PATCH] D128411: [syntax] Introduce a BaseToken class.

2022-06-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 439705. hokein added a comment. Revised to the TokenManager approach: - Inroduce a Base Token class (TokenManager) for syntax-tree, the motivation is to allow using different underlying token implementation in syntax-tree - Decouple the syntax-tree from the T

[PATCH] D128411: [syntax] Introduce a BaseToken class.

2022-06-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. I'm quite happy about the interfaces now, it should be in a good shape for the API review (would be nice to get some initial feedback before I do further cleanup). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128411/new/

[clang-tools-extra] 9081d3d - [clang-tidy] Make the cert/uppercase-literal-suffix-integer fully hermetic.

2022-06-24 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2022-06-24T14:18:02+02:00 New Revision: 9081d3d8097af5e89905faf0ed568ba7e848e8df URL: https://github.com/llvm/llvm-project/commit/9081d3d8097af5e89905faf0ed568ba7e848e8df DIFF: https://github.com/llvm/llvm-project/commit/9081d3d8097af5e89905faf0ed568ba7e848e8df.diff LO

[PATCH] D128511: [clang-tidy] Make the cert/uppercase-literal-suffix-integer fully hermetic.

2022-06-24 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9081d3d8097a: [clang-tidy] Make the cert/uppercase-literal-suffix-integer fully hermetic. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D128499: [Clang] Fix: Restore warning inadvertently removed by D126061.

2022-06-24 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 439708. mboehme added a comment. Changes in response to review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128499/new/ https://reviews.llvm.org/D128499 Files: clang/include/clang/Sema/Sema.h cl

[PATCH] D128499: [Clang] Fix: Restore warning inadvertently removed by D126061.

2022-06-24 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked an inline comment as done. mboehme added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:4633-4637 Sema::ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, DeclSpec &DS, RecordDecl *&AnonRecord) { - return ParsedFr

[PATCH] D128446: [clang][dataflow] Use annotations for optional diagnostic tests

2022-06-24 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added inline comments. This revision is now accepted and ready to land. Comment at: clang/unittests/Analysis/FlowSensitive/UncheckedOptionalAccessModelTest.cpp:1258 + + llvm::DenseSet AnnotationLines; + for

[PATCH] D128357: [clang][dataflow] Store flow condition constraints in a single `FlowConditionConstraints` map.

2022-06-24 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 439714. wyt marked 3 inline comments as done. wyt added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128357/new/ https://reviews.llvm.org/D128357 Files: clang/include/clang/Analysis

[PATCH] D128519: [clang][dataflow] Move logic for creating implication and iff expressions into `DataflowAnalysisContext` from `DataflowEnvironment`.

2022-06-24 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, tschuett, xazax.hun. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. To keep functionality of creating boolean expressions in a consistent locati

[PATCH] D128520: [clang][dataflow] Refactor function that queries the solver for satisfiability checking.

2022-06-24 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, tschuett, xazax.hun. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Given a set of `Constraints`, `querySolver` adds common background informati

[PATCH] D128521: [clang][dataflow] Implement functionality to compare if two boolean values are equivalent.

2022-06-24 Thread weiyi via Phabricator via cfe-commits
wyt created this revision. Herald added subscribers: martong, tschuett, xazax.hun. Herald added a project: All. wyt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. `equivBoolVals` compares equivalence between two booleans. The current impl

[PATCH] D128363: [clang][dataflow] Implement functionality for flow condition variable substitution.

2022-06-24 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 439719. wyt marked an inline comment as done. wyt added a comment. Address comments - improve test clarity by comparing substituted flow condition with an expected value using `equivalentBoolValues` utility. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D128359: [clang][dataflow] Move logic for `createStorageLocation` from `DataflowEnvironment` to `DataflowAnalysisContext`.

2022-06-24 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 439720. wyt marked 5 inline comments as done. wyt added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128359/new/ https://reviews.llvm.org/D128359 Files: clang/include/clang/Analysis

[PATCH] D128056: [clang][dataflow] Singleton pointer values for null pointers.

2022-06-24 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 439721. wyt marked 5 inline comments as done. wyt added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128056/new/ https://reviews.llvm.org/D128056 Files: clang/include/clang/Analysis

[PATCH] D128359: [clang][dataflow] Move logic for `createStorageLocation` from `DataflowEnvironment` to `DataflowAnalysisContext`.

2022-06-24 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev accepted this revision. sgatev added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:91 + /// Creates a stable storage location appropriate for `Type`. + /// ---

[PATCH] D128449: [clang] Introduce -Warray-parameter

2022-06-24 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 439718. serge-sans-paille added a comment. Take review into account : rework indentation, style cleaning and be more accurate about bounds reporting CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128449/new/ https://reviews.llvm.org/D12844

[PATCH] D128056: [clang][dataflow] Singleton pointer values for null pointers.

2022-06-24 Thread weiyi via Phabricator via cfe-commits
wyt added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:252-255 + // FIXME: The pointer values are indexed by the pointee types which are + // required to initialize the `PointeeLoc` field in `PointerValue`. Consider + // cr

[PATCH] D126534: [analyzer] Deadstore static analysis: Fix false positive on C++17 assignments

2022-06-24 Thread Fred Tingaud via Phabricator via cfe-commits
frederic-tingaud-sonarsource updated this revision to Diff 439722. frederic-tingaud-sonarsource added a comment. Adding an additional false negative fixed by this patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126534/new/ https://reviews.llvm.org/D126534 Files: clang/lib/Static

[PATCH] D128501: [CodeGen] Make uninitialized Lvalue bit-field stores poison compatible

2022-06-24 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. Seems right to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128501/new/ https://reviews.llvm.org/D128501 _

[PATCH] D128411: [syntax] Introduce a BaseToken class.

2022-06-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang/include/clang/Tooling/Syntax/TokenManager.h:23 + +/// Base token interfaces for the syntax-tree. +class TokenManager { NIT: maybe explain the `TokenManager` concept here, the comment seems to be a leftover f

[PATCH] D128482: [clang codegen] Add dso_local/hidden/etc. markings to VTT declarations

2022-06-24 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128482/new/ https://reviews.llvm.org/D128482 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D128379: [clangd] Change the url for clang-tidy check documentation

2022-06-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. luckily this document links were introduced only recently, hence they didn't make it to clangd-14, but they'll start being around from clangd-15 and such changes will be breaking all the links in existing clangd's. i wonder if we should actually point these at releases

[PATCH] D128467: [clang][dataflow] Allow MatchSwitch to return a value

2022-06-24 Thread Sam Estep via Phabricator via cfe-commits
samestep added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/MatchSwitch.h:49 /// appropriate handler. -template -using MatchSwitch = std::function; +template +using MatchSwitch = std::function; gribozavr2 wrote: > WDYT? like a "funct

[PATCH] D128411: [syntax] Introduce a BaseToken class.

2022-06-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang/include/clang/Tooling/Syntax/TokenManager.h:33 + /// The syntax-tree Leaf node holds a Key. + using Key = const void *; + /// Gets the text of token identified by the key. I have just realized that we were

[PATCH] D128467: [clang][dataflow] Allow MatchSwitch to return a value

2022-06-24 Thread Sam Estep via Phabricator via cfe-commits
samestep updated this revision to Diff 439723. samestep added a comment. - Use Result instead of Output - Merge branch 'main' into match-switch-return-non-void Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128467/new/ https://reviews.llvm.org/D1284

[PATCH] D109701: [clang] Emit SARIF Diagnostics: Create `clang::SarifDocumentWriter` interface

2022-06-24 Thread Vaibhav Yenamandra via Phabricator via cfe-commits
vaibhav.y added inline comments. Comment at: clang/lib/Basic/Sarif.cpp:161 +Region["endColumn"] = adjustColumnPos( +R.getEnd(), Lexer::MeasureTokenLength(R.getEnd().getLocWithOffset(0), + R.getEnd().getManager(), LO));

[PATCH] D128379: [clangd] Change the url for clang-tidy check documentation

2022-06-24 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Pointing the documentation links based on build configuration and version definitely makes sense as evolving checks could easily confuse users. Guess the idea is snapshot builds will use the in progress release notes, and release builds can point to the actual release d

[PATCH] D128363: [clang][dataflow] Implement functionality for flow condition variable substitution.

2022-06-24 Thread weiyi via Phabricator via cfe-commits
wyt marked 3 inline comments as done. wyt added a comment. @xazax.hun > Could you elaborate on why do we need this? We are currently working on a pointer nullability analysis here: https://github.com/google/crubit/tree/main/nullability_verification. One of the things we are trying to do is to c

[PATCH] D128467: [clang][dataflow] Allow MatchSwitch to return a value

2022-06-24 Thread Sam Estep 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 rG4eecd194b073: [clang][dataflow] Allow MatchSwitch to return a value (authored by samestep). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[clang] 4eecd19 - [clang][dataflow] Allow MatchSwitch to return a value

2022-06-24 Thread Sam Estep via cfe-commits
Author: Sam Estep Date: 2022-06-24T13:32:47Z New Revision: 4eecd194b073492a309b87c8f60da6614bba9153 URL: https://github.com/llvm/llvm-project/commit/4eecd194b073492a309b87c8f60da6614bba9153 DIFF: https://github.com/llvm/llvm-project/commit/4eecd194b073492a309b87c8f60da6614bba9153.diff LOG: [cl

[PATCH] D127803: Generate the capture for field when the field is used in openmp region with implicit default in the member function.

2022-06-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2398 +return VD; + ExprResult ThisExpr = ActOnCXXThis(SourceLocation()); + if (ThisExpr.isInvalid()) Maybe `BuildCXXThisExpr(SourceLocation(), getCurrentThisType(), /*IsIm

[PATCH] D125625: Implementation of '#pragma STDC FENV_ROUND'

2022-06-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: zahiraam. aaron.ballman added a comment. Thank you for working on this (and thank you for your patience with how long it's taken me to get to this review)! Adding another reviewer who has recently been poking at floating point environment pragmas in case Zahira h

[PATCH] D128519: [clang][dataflow] Move logic for creating implication and iff expressions into `DataflowAnalysisContext` from `DataflowEnvironment`.

2022-06-24 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:170 + /// will be a value that represents the true boolean literal. + BoolValue &createImplication(BoolValue &LHS, BoolValue &RHS); + Let's call it `

[PATCH] D128521: [clang][dataflow] Implement functionality to compare if two boolean values are equivalent.

2022-06-24 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp:138 +bool DataflowAnalysisContext::equivalentBoolValues(BoolValue &Val1, + BoolValue &Val2) { This seems unr

[PATCH] D128359: [clang][dataflow] Move logic for `createStorageLocation` from `DataflowEnvironment` to `DataflowAnalysisContext`.

2022-06-24 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 439730. wyt marked 3 inline comments as done. wyt added a comment. Fix comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128359/new/ https://reviews.llvm.org/D128359 Files: clang/include/clang/Analysis/Flow

[PATCH] D122677: [prototype] include-cleaner library

2022-06-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. hi Serge, sorry for the silence here. we'll be moving this towards a production ready version over the next months (also releasing some comments i've forgotten to send, we've already discussed these offline so no need for action). we'll probably be leaving some todos/fi

[clang] 7b326b9 - Revert "[clang][dataflow] Allow MatchSwitch to return a value"

2022-06-24 Thread Sam Estep via cfe-commits
Author: Sam Estep Date: 2022-06-24T13:52:11Z New Revision: 7b326b946a38f58c9b3fdfeee09678bc4bf91292 URL: https://github.com/llvm/llvm-project/commit/7b326b946a38f58c9b3fdfeee09678bc4bf91292 DIFF: https://github.com/llvm/llvm-project/commit/7b326b946a38f58c9b3fdfeee09678bc4bf91292.diff LOG: Rev

[PATCH] D128482: [clang codegen] Add dso_local/hidden/etc. markings to VTT declarations

2022-06-24 Thread Justin Cady via Phabricator via cfe-commits
justincady accepted this revision. justincady added a comment. LGTM! Just to double check I tested this exact patch locally with the setup that found the problem. I confirmed it resolved that issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D12

[clang] 1dcbe03 - [Binary] Further improve malformed input handling for the OffloadBinary

2022-06-24 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-06-24T09:57:44-04:00 New Revision: 1dcbe03c32c197324e840717bb8dbf0b925ca433 URL: https://github.com/llvm/llvm-project/commit/1dcbe03c32c197324e840717bb8dbf0b925ca433 DIFF: https://github.com/llvm/llvm-project/commit/1dcbe03c32c197324e840717bb8dbf0b925ca433.diff

[PATCH] D128521: [clang][dataflow] Implement functionality to compare if two boolean values are equivalent.

2022-06-24 Thread weiyi via Phabricator via cfe-commits
wyt added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp:138 +bool DataflowAnalysisContext::equivalentBoolValues(BoolValue &Val1, + BoolValue &Val2) { sgatev wrote: > T

[PATCH] D125723: [MSVC] Add initial support for MSVC pragma optimize

2022-06-24 Thread Stephen Long via Phabricator via cfe-commits
steplong updated this revision to Diff 439738. steplong added a comment. - Run pre-merge checks again after abandoning dependent patch D126984 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125723/new/ https://rev

[PATCH] D126682: [Interpreter][ClangRepl] Implement undo command

2022-06-24 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 439744. junaire added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126682/new/ https://reviews.llvm.org/D126682 Files: clang/include/clang/Interpreter/Interpreter.h clang/lib/Interpreter

[clang] 886715a - [clang] Introduce -fstrict-flex-arrays= for stricter handling of flexible arrays

2022-06-24 Thread via cfe-commits
Author: serge-sans-paille Date: 2022-06-24T16:13:29+02:00 New Revision: 886715af962de2c92fac4bd37104450345711e4a URL: https://github.com/llvm/llvm-project/commit/886715af962de2c92fac4bd37104450345711e4a DIFF: https://github.com/llvm/llvm-project/commit/886715af962de2c92fac4bd37104450345711e4a.d

[PATCH] D123952: [FPEnv] Allow CompoundStmt to keep FP options

2022-06-24 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:452 + : getCurCompoundScope().FPFeatures; + FPOptionsOverride FPDiff = getCurFPFeatures().diffWith(FPO); + How cheap is this? Is this something it would be worthwhile t

[PATCH] D128533: [clang][dataflow] Allow MatchSwitch to return a value

2022-06-24 Thread Sam Estep via Phabricator via cfe-commits
samestep created this revision. Herald added subscribers: martong, tschuett, xazax.hun. Herald added a project: All. samestep requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D1

[PATCH] D118996: [clang-tidy] Support C++14 in bugprone-signal-handler.

2022-06-24 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 439751. balazske added a comment. updated for new directory layout, fixed documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118996/new/ https://reviews.llvm.org/D118996 Files: clang-tools-extra/cl

[clang] 8c278a2 - [clang][dataflow] Allow MatchSwitch to return a value

2022-06-24 Thread Sam Estep via cfe-commits
Author: Sam Estep Date: 2022-06-24T14:38:00Z New Revision: 8c278a27811ccf9d7a32c0a460b08069c4b3b7b5 URL: https://github.com/llvm/llvm-project/commit/8c278a27811ccf9d7a32c0a460b08069c4b3b7b5 DIFF: https://github.com/llvm/llvm-project/commit/8c278a27811ccf9d7a32c0a460b08069c4b3b7b5.diff LOG: [cl

[PATCH] D128533: [clang][dataflow] Allow MatchSwitch to return a value

2022-06-24 Thread Sam Estep 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 rG8c278a27811c: [clang][dataflow] Allow MatchSwitch to return a value (authored by samestep). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D126183: Implement soft reset of the diagnostics engine.

2022-06-24 Thread Vassil Vassilev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG946c45a4ed5d: Implement soft reset of the diagnostics engine. (authored by tapaswenipathak, committed by v.g.vassilev). Changed prior to commit: https://reviews.llvm.org/D126183?vs=436750&id=439757#toc

[clang] 946c45a - Implement soft reset of the diagnostics engine.

2022-06-24 Thread Vassil Vassilev via cfe-commits
Author: Tapasweni Pathak Date: 2022-06-24T14:46:54Z New Revision: 946c45a4ed5d5e2f262110a27390369f0d8fc3eb URL: https://github.com/llvm/llvm-project/commit/946c45a4ed5d5e2f262110a27390369f0d8fc3eb DIFF: https://github.com/llvm/llvm-project/commit/946c45a4ed5d5e2f262110a27390369f0d8fc3eb.diff L

[PATCH] D128048: Add a new clang option "-ftime-trace-path"

2022-06-24 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. In D128048#3607295 , @MaskRay wrote: > You may add `-ftime-trace=` instead of introducing a new spelling. I like this idea. There is an example of an optional argument on an option with -print-changed. Repository: rG

[PATCH] D128535: [analyzer] Improve loads from reinterpret-cast fields

2022-06-24 Thread Balázs Benics via Phabricator via cfe-commits
steakhal created this revision. steakhal added reviewers: NoQ, martong, ASDenysPetrov. Herald added subscribers: manas, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: Szelethus. Herald added a project: All. steak

[PATCH] D128519: [clang][dataflow] Move logic for creating implication and iff expressions into `DataflowAnalysisContext` from `DataflowEnvironment`.

2022-06-24 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 439761. wyt marked 2 inline comments as done. wyt added a comment. Address comments - rename createIff/Implication to getOrCreateIff/Implication and add tests for these functions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D127803: Generate the capture for field when the field is used in openmp region with implicit default in the member function.

2022-06-24 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 439760. jyu2 marked an inline comment as done. jyu2 added a comment. Address Alexey's comments! Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127803/new/ https://reviews.llvm.org/D127803 Files: clang/l

[PATCH] D128521: [clang][dataflow] Implement functionality to compare if two boolean values are equivalent.

2022-06-24 Thread weiyi via Phabricator via cfe-commits
wyt updated this revision to Diff 439762. wyt added a comment. Rename createIff to getOrCreateIff based on change in parent patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128521/new/ https://reviews.llvm.org/D128521 Files: clang/include/cl

[PATCH] D127803: Generate the capture for field when the field is used in openmp region with implicit default in the member function.

2022-06-24 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2398 +return VD; + ExprResult ThisExpr = ActOnCXXThis(SourceLocation()); + if (ThisExpr.isInvalid()) ABataev wrote: > Maybe `BuildCXXThisExpr(SourceLocation(), getCurrentThisT

[clang] 186bea3 - [MSVC] Add initial support for MSVC pragma optimize

2022-06-24 Thread Stephen Long via cfe-commits
Author: Stephen Long Date: 2022-06-24T08:03:42-07:00 New Revision: 186bea3750d6b349de0e71044d95e2a42e087b4c URL: https://github.com/llvm/llvm-project/commit/186bea3750d6b349de0e71044d95e2a42e087b4c DIFF: https://github.com/llvm/llvm-project/commit/186bea3750d6b349de0e71044d95e2a42e087b4c.diff

[PATCH] D125723: [MSVC] Add initial support for MSVC pragma optimize

2022-06-24 Thread Stephen Long 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 rG186bea3750d6: [MSVC] Add initial support for MSVC pragma optimize (authored by steplong). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D127803: Generate the capture for field when the field is used in openmp region with implicit default in the member function.

2022-06-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:11071-11073 + if (!getDerived().AlwaysRebuild() && !getSema().getLangOpts().OpenMP && + Base.get() == E->getBase() && QualifierLoc == E->getQualifierLoc() && + Member == E->getMemberDecl() && Fou

[clang] 8ad4c6e - [HIP] add -fhip-kernel-arg-name

2022-06-24 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2022-06-24T11:15:36-04:00 New Revision: 8ad4c6e4b1299d599c0b6defe6a9e90a417c7ba8 URL: https://github.com/llvm/llvm-project/commit/8ad4c6e4b1299d599c0b6defe6a9e90a417c7ba8 DIFF: https://github.com/llvm/llvm-project/commit/8ad4c6e4b1299d599c0b6defe6a9e90a417c7ba8.dif

[PATCH] D128022: [HIP] add -fhip-kernel-arg-name

2022-06-24 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. yaxunl marked 2 inline comments as done. Closed by commit rG8ad4c6e4b129: [HIP] add -fhip-kernel-arg-name (authored by yaxunl). Herald added a project: clang. Changed

[PATCH] D127898: [clang][dataflow] Add API to separate analysis from diagnosis

2022-06-24 Thread Sam Estep via Phabricator via cfe-commits
samestep marked an inline comment as done. samestep added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h:85 +private: + ASTContext &Context; + MatchSwitch>> samestep wrote: > xazax.hun wrote: > > D

[PATCH] D109701: [clang] Emit SARIF Diagnostics: Create `clang::SarifDocumentWriter` interface

2022-06-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Basic/Sarif.cpp:161 +Region["endColumn"] = adjustColumnPos( +R.getEnd(), Lexer::MeasureTokenLength(R.getEnd().getLocWithOffset(0), + R.getEnd().getManager(), LO));

[PATCH] D128363: [clang][dataflow] Implement functionality for flow condition variable substitution.

2022-06-24 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp:217 +llvm::DenseMap Substitutions) { + llvm::DenseMap SubstitutionsCache; + Substitut

[PATCH] D127803: Generate the capture for field when the field is used in openmp region with implicit default in the member function.

2022-06-24 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:11071-11073 + if (!getDerived().AlwaysRebuild() && !getSema().getLangOpts().OpenMP && + Base.get() == E->getBase() && QualifierLoc == E->getQualifierLoc() && + Member == E->getMemberDecl() && FoundD

[PATCH] D127898: [clang][dataflow] Add API to separate analysis from diagnosis

2022-06-24 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.h:85 +private: + ASTContext &Context; + MatchSwitch>> samestep wrote: > samestep wrote: > > xazax.hun wrote: > > > Do we expect this to

[PATCH] D127803: Generate the capture for field when the field is used in openmp region with implicit default in the member function.

2022-06-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:11071-11073 + if (!getDerived().AlwaysRebuild() && !getSema().getLangOpts().OpenMP && + Base.get() == E->getBase() && QualifierLoc == E->getQualifierLoc() && + Member == E->getMemberDecl() && Fou

[PATCH] D128402: [clang-tidy] Don't treat invalid branches as identical

2022-06-24 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:221-224 +- Fixed a crash in :doc:`performance-unnecessary-value-param + ` when the specialization + template has an unnecessary value parameter. Removed the fix for a template. + -

[clang-tools-extra] 5e97788 - [clang-tidy] Update release notes (NFC)

2022-06-24 Thread via cfe-commits
Author: Richard Date: 2022-06-24T10:48:47-06:00 New Revision: 5e97788a3eca62aa80cf42bdc697e93838554cda URL: https://github.com/llvm/llvm-project/commit/5e97788a3eca62aa80cf42bdc697e93838554cda DIFF: https://github.com/llvm/llvm-project/commit/5e97788a3eca62aa80cf42bdc697e93838554cda.diff LOG:

[PATCH] D128402: [clang-tidy] Don't treat invalid branches as identical

2022-06-24 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. OK, I've pushed the link fix and the sorting fix to main so if you rebase again, it should just show your changes to the release notes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128402/new/ https://reviews.llvm.org/D128402 ___

[clang] 5fa4629 - [Sema] Check whether `__auto_type` has been deduced before merging

2022-06-24 Thread Akira Hatanaka via cfe-commits
Author: Akira Hatanaka Date: 2022-06-24T09:49:07-07:00 New Revision: 5fa4629581f6938cc175be5d4a3fccdfbf9fc227 URL: https://github.com/llvm/llvm-project/commit/5fa4629581f6938cc175be5d4a3fccdfbf9fc227 DIFF: https://github.com/llvm/llvm-project/commit/5fa4629581f6938cc175be5d4a3fccdfbf9fc227.diff

[PATCH] D128373: [Sema] Check whether `__auto_type` has been deduced before merging

2022-06-24 Thread Akira Hatanaka 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 rG5fa4629581f6: [Sema] Check whether `__auto_type` has been deduced before merging (authored by ahatanak). Changed prior to commit: https://reviews.

[PATCH] D128401: [clang-tidy] Fixing a bug raising false alarms on static local variables in the Infinite Loop Checker

2022-06-24 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp:190 + +containsFunc |= (CanDecl == Func); +overlap |= Callees.contains(CanDecl); Personally I'm not a fan of using bitwise operators with bool

  1   2   >